Reading/writing wide characters

J

Josef Moellers

Hi,

I have an MP3 player (an iPod clone?) which stores its playlist with
wide (16 bit) characters. I'd like to manipulate the playlist using
perl. Is there a way to transparently handle wide characters so I can
read other, non-wide, files and write wide characters to the playlist?

TIA,

Josef
 
A

Alan J. Flavell

I have an MP3 player (an iPod clone?) which stores its playlist with
wide (16 bit) characters.

Possibly utf-16 (of one or other endianness)?
I'd like to manipulate the playlist using perl. Is there a way to
transparently handle wide characters so I can read other, non-wide,
files and write wide characters to the playlist?

Yes. Look into encode layers in 5.8.*, or explicit Encode calls if
in 5.6 (but better to upgrade).

Start with perluniintro and work out from there (perlunicode,
encoding, Encode ...)

Once you've assured that you can read-in what you've got, to Perl's
natural internal format, then it should be plain sailing (output
should just be the converse).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top