INTERACT FORUM

More => Old Versions => Media Center 12 (Development Ended) => Topic started by: mark_h on July 01, 2008, 05:30:41 am

Title: Export mpl files and unicode characters
Post by: mark_h on July 01, 2008, 05:30:41 am
I've been working on some scripts which work on exported playlists... I need to export text and mpl files for processing and just noticed that mpl files do not handle unicode characters gracefully.

Example:

Artist: Änglagård Album: Hyrbis Track: Jordrök

Playlist exported as text:

artist|album|track
|Änglagård|Hybris|Jordrök|

Playlist exported as mpl:

<Field Name="Filename">Z:\My Music\Änglagård\Hybris\Änglagård - Hybris - 01 - Jordrök.flac</Field>

The unicode in the mpl file is simply wrong...

Am I misunderstanding this?  If not, could we get a fix please.

Many thanks,

Mark









Title: Re: Export mpl files and unicode characters
Post by: Matt on July 01, 2008, 07:43:30 am
That's called UTF-8, and it's a correct way of handling of Unicode.  If you look at the XML header, it'll say that it's using UTF-8 encoding.
Title: Re: Export mpl files and unicode characters
Post by: mark_h on July 01, 2008, 07:51:20 am
OK, thanks, Matt. 

Anybody recommend an easy way to convert/compare the text file output to the UTF-8?  I'm using PERL, so perhaps there's a library I can 'use'... ?

Mark
Title: Re: Export mpl files and unicode characters
Post by: Alex B on July 01, 2008, 08:03:31 am
I did a Google search for Perl "UTF-8". It found 3,350,000 results.   :)

For instance, could this help:  http://ahinea.com/en/tech/perl-unicode-struggle.html  ?
Title: Re: Export mpl files and unicode characters
Post by: mark_h on July 01, 2008, 08:06:58 am
Cheers, Alex! That link looks like exactly what I'm after. 

Mark