Re: Preserving Chinese Characters when reading and writing text



On May 31, 11:11 am, Clive Green <e...@xxxxxxxxxxxxxx> wrote:
Hello peeps,

I am using PHP 5.2.2 together with MP3_Id (a PEAR module for reading and
writing MP3 tags). I have been using PHP on the command line (Mac OS X
Unix shell, to be precise), and am getting on more or less OK.

So far, I have managed to parse my tab-delimited .txt file properly into
an array, and then use this array to update the tags on a bunch of MP3
audio files. Nice.

Thing is, some of the track names specified in my text file are in
Simplified Chinese characters. These show up just fine within my .txt
file's editor (TextMate), but appear garbled within the final output.
Ack.

What I need is a way of reading and/or preserving the Chinese
characters, so that I can (hopefully) write them to my MP3 files.

I am sure some of you have already cracked this one a long time ago. I
hope you'll exercise some patience and give me a few pointers here!

I am not much more than a PHP newbie, so forgive me if I have overlooked
anything obvious :-)

--
Clive Green

Play with encoding choices. UTF-8 for both the text file and the PHP
functions you use if possible.

-Mike PII

.



Relevant Pages

  • Re: [PHP] MP3 Ripping
    ... Is there someway that PHP can read the CD and rip the files??? ... If you want to send the file -- I suppose you could stream it to Winamp ... There are a few thousand mp3 ripping and cataloging programs ...
    (php.general)
  • Re: [PHP] MP3 Ripping
    ... >> So what I have done is made a MySQL database with all the Artist, Genre, ... Is there someway that PHP can read the CD and rip the files??? ... You mean the contents of the mp3 file?! ... Someone said WinAmp had a ...
    (php.general)
  • Re: [PHP] Help me about audio stream...
    ... Create your MP3 somehow with a CD-ripper/encoder or whatever. ... Upload the MP3 to your website, just like an HTML page, but be sure it ... None of this has anything to do with PHP, really, so some obligatory ... You can use a script like "sample" to sort of funnel requests for the ...
    (php.general)
  • Preserving Chinese Characters when reading and writing text
    ... writing MP3 tags). ... I have been using PHP on the command line (Mac OS X ... and then use this array to update the tags on a bunch of MP3 ... Simplified Chinese characters. ...
    (comp.lang.php)
  • Re: Swans site wildflowerstew.org hacked!
    ... >> outdated version of php and that that may have been how they got in. ... > Funny that the host would know, unless there was a very large attack. ... Shaggy lurks here (so don't say nothin bad about 'em- he's very ... has been reading this stuff here and communicating it back with Shaggy ...
    (alt.gathering.rainbow)