INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Export mpl files and unicode characters  (Read 1748 times)

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Export mpl files and unicode characters
« 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









Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Export mpl files and unicode characters
« Reply #1 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.
Logged
Matt Ashland, JRiver Media Center

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: Export mpl files and unicode characters
« Reply #2 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
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Export mpl files and unicode characters
« Reply #3 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  ?
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: Export mpl files and unicode characters
« Reply #4 on: July 01, 2008, 08:06:58 am »

Cheers, Alex! That link looks like exactly what I'm after. 

Mark
Logged
Pages: [1]   Go Up