Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: surfer on June 22, 2008, 07:24:36 AM

Title: ñ (spanish character): add to playlist not possible
Post by: surfer on June 22, 2008, 07:24:36 AM
I have spanish songs with the character ñ in the titles. in general i can play them without problems from directories or playlists.

but this character changes to a sign 'A+' when added to a playlist in the "playlist catalog". when i try to play the added song i get an '[ERR]...(song title)' shown at the beginning of the song title on the playlist and the song simply does not start to play.
Title: Re: ñ (spanish character): add to playlist not possible
Post by: Lear on June 22, 2008, 12:20:49 PM
Hm, a similar problem has been reported before... One possible reason is that the file name isn't using the proper character encoding on disk, and that for some reason this gets mangled when added to a playlist.

How did you copy this file (i.e., using what OS. If on Linux, it might be a bad setting in the fstab entry)? Can you check the character code the ñ has been converted to in the playlist? It'd be nice if you could check the actual character code on disk too, but I don't really know how to do something like that...

[Edit:] Another possibility... Exactly what do you do after inserting the track but before trying to actually play the file? Saved the playlist anywhere? If so, under what name?
Title: Re: ñ (spanish character): add to playlist not possible
Post by: surfer on June 22, 2008, 03:25:51 PM
i use win XP sp3 and the audio-manager "MediaMonkey".

i copy the files dragging them in windows explorer or using the sync feature of the mediamonkey.

From mediamonkey i export an empty m3u playlist "x.m3u" (UTF-8 encoding)whch i put into the rockbox folder "playlists" so that i can see it in the "playlist catalog". so the playlists is already there when i add songs to it.

while playling a track i i hold select (ipod) and get the context menu for the playlist catalog and to add songs. while adding to "x.m3u" the character ñ becomes the strange sign 'A+'


Quote
you check the character code the ñ has been converted to in the playlist?

when i only new how to do that? :-)
Title: Re: ñ (spanish character): add to playlist not possible
Post by: markun on June 22, 2008, 06:51:59 PM
Try renaming your playlist from .m3u to .m3u8
Rockbox converts .m3u files from the selected codepage to UTF-8, so that's probably your problem. .m3u8 files are expected to be in UTF-8 already.
Title: Re: ñ (spanish character): add to playlist not possible
Post by: surfer on June 23, 2008, 05:16:57 AM
Thanks a lot, markun, renaming to .m3u8 solved the problem but only partially:
all the titles with the wrong sign ñ changed to ñ after renaming to m3u8 .... but only when you take a look at them in rockbox.

but when you take a look at the same playlist in mediamonkey, in which you can see the content of a playlist anywhere on your drives, the titles contain again ñ instead of ñ.
as a result you can not open this playlist completely in other apps like foobar or winamp because the tracks with the wrong ñ are not found.


and one more thing:
when i open the playlist with the simple text editor of winxp with the coding option "ANSI" you see the added titles with ñ, but when you open it with the coding option "UTF-8" you see the titles with the wright character ñ.
Title: Re: ñ (spanish character): add to playlist not possible
Post by: Llorean on June 23, 2008, 08:56:49 AM
That's a bug in MediaMonkey then (and notepad).
Title: Re: ñ (spanish character): add to playlist not possible
Post by: surfer on June 24, 2008, 04:53:15 AM
Hmmm... let's take an example:

- i have a playlist "test" in mediamonkey with the track "señora" on it which i save as the file "test.m3u"
- i open it in the wordpad (or the simple "editor" as ANSI-coding) of winxp and see this:

Quote
#EXTM3U
#EXTINFUTF8:243,Hildemaro - señora
#EXTINF:243,Hildemaro - señora
#UTF8:señora.mp3
señora.mp3

- i open it in the simple "editor" as UTF-8-coding and see this:

Quote
#EXTM3U
#EXTINFUTF8:243,Hildemaro - señora
#EXTINF:243,Hildemaro - seora
#UTF8:señora.mp3
seora.mp3

- i can play the playlist "test.m3u" in winamp, foobar2000, drag it (with the track "señora.mp3") to the folder "playlists" on my rockbox-Ipod and play it in rockbox without problems. rockbox shows the entry on this playlist correctly as "señora".

But when i add this playling track again to the same playlist in rockbox it gets added as "señora" and can not be played because rockbox does not find the track.
 

changing the name to "m3u8"

to test what happens after renaming to "m3u8" i do the following:

- i save the mediamonkey playlist "test" 2 times to the directory "playlists" in rockbox and give them the names "test.m3u8"(with the track señora on it) and "test2.m3u8 (empty, without señora)

- "test.m3u8" can NOT be played because the entry already on this playlist gets renamed
to "se ora" (ñ desappears). i did not notice it before...sorry.

- now when i play the track "señora.mp3" from the directory "playlists" and add it to "test2.m3u8" it seems to get added to this playlist correctly as "señora" but i can play this second entry of the same track only in rockbox.

- i can NOT open "test2.m3u8" in winamp, foobar2000 or mediamonkey becuase m3u8 is not supported.
- when i rename "test2.m3u8" to "m3u" again and open this playlist in winamp, foobar2000 or mediamonkey the added entry on the playlist shows again wrongly as "señora" and can not be played in those apps..

Title: Re: ñ (spanish character): add to playlist not possible
Post by: Lear on June 24, 2008, 06:28:53 AM
This is expected behavior. Rockbox will currently always write the filenames as UTF-8, regardless of the extension of the playlist file. However, when reading, it only parses the file as UTF-8 if the extension is .m3u8 (or the file contains a BOM, which are a few bytes first in the file that is sometimes used to indicate that a file contains stuff encoded in UTF-8). Also, Rockbox doesn't support any EXTM3U stuff.

Short answer is, any playlist created/modified by Rockbox should be saved as .m3u8.

Hm... It shouldn't be too hard to make Rockbox write a BOM first (either always, or only if the file extension is .m3u), though that could confuse other applications. Making the first line a comment could perhaps reduce that problem...

As for MediaMonkey, either it doesn't support .m3u8, or it might require a BOM first in the file then (I think Foobar2000 is like that).
Title: Re: ñ (spanish character): add to playlist not possible
Post by: surfer on June 24, 2008, 07:18:19 AM
Quote
However, when reading, it only parses the file as UTF-8 if the extension is .m3u8

But rockbox reads and plays the playlist "test.m3u" with "señora" on it correctly.
It's after rename to m3u8 or after adding songs with this non-english character (and probably others?)where the problems begin to appear.

what i want to do is to put an empty playlist on my player with rockbox, add songs to it while listening und use the playlist out of rockbox in other applications afterwards. how can i achieve that?
Title: Re: ñ (spanish character): add to playlist not possible
Post by: markun on June 24, 2008, 10:09:57 AM
But rockbox reads and plays the playlist "test.m3u" with "señora" on it correctly.
It's after rename to m3u8 or after adding songs with this non-english character (and probably others?)where the problems begin to appear.

The file you showed earlier was encoded in latin1 (with the UTF-8 name in the #UTF8 comment) which is read correctly when the extension is .m3u and your codepage in rockbox is set to latin1.

They only way it would work on rockbox and your computer is to always save the playlists as UTF-8 encoded .m3u8 files, but maybe not all programs support this.

Good luck
Title: Re: ñ (spanish character): add to playlist not possible
Post by: Lear on June 24, 2008, 05:03:23 PM
Okay, made Rockbox include a byte order mark when saving a .m3u8 file (or rather, when the file extension isn't ".m3u"), as Foobar2000 requires that in order to read playlist files as UTF-8 encoded.

Making Rockbox write .m3u-files using the current code page isn't difficult to add as such, but I'm not sure how to handle the case where the file name can't be fully represented in the current code page...

Regarding MediaMonkey, some messages in their forum indicate that M3U8 isn't supported in 3.0 (only looked briefly).
Title: Re: ñ (spanish character): add to playlist not possible
Post by: surfer on June 25, 2008, 05:17:48 AM
Quote
They only way it would work on rockbox and your computer is to always save the playlists as UTF-8 encoded .m3u8 files

Does anybody know of a workaround so that i can in some way use playlists in mediamonkey to which i added tracks with unicode characters like spanish ñ in rockbox?
Title: Re: ñ (spanish character): add to playlist not possible
Post by: bascule on June 25, 2008, 08:04:20 AM
Have you actually tried it in MediaMonkey since Lear committed the fix for this? If MM looks for the BOM that has now been added, it should work OK.
Title: Re: ñ (spanish character): add to playlist not possible
Post by: surfer on June 25, 2008, 10:40:16 AM
@bascule:
yes, i did, and i can not open the modified ".m3u8" playlist neither in mediamonkey nor in foobar2000.
Title: Re: ñ (spanish character): add to playlist not possible
Post by: Lear on June 25, 2008, 03:55:39 PM
Foobar2000 does support .m3u8, it's just a bit picky about the format. The file must contain a BOM and the path separator char must be "\"...
Title: Re: ñ (spanish character): add to playlist not possible
Post by: surfer on June 26, 2008, 03:32:27 AM
As far as i can see the extension "m3u8" is not supported by any other app than foobar2000 until now.

on the other hand "m3u" is practically a standard and it's at least a pity that only reading of it seems to be fully supported by rockbox.

Quote
Making Rockbox write .m3u-files using the current code page isn't difficult to add as such, but I'm not sure how to handle the case where the file name can't be fully represented in the current code page...

I hope you won't give up thinking about it :-)
Title: Re: ñ (spanish character): add to playlist not possible
Post by: Llorean on June 26, 2008, 04:05:02 AM
I think the point you're missing is that the fact that there isn't a standard way to handle m3u files containing special characters and that is the problem here. It's not Rockbox lacking support, but merely a difference in implementation on something that doesn't have a proper standard so that everyone can be "on the same page" as it were.

m3u8 is just an m3u known to be UTF-8, making the job a good deal easier.
Title: Re: ñ (spanish character): add to playlist not possible
Post by: surfer on June 26, 2008, 06:34:56 AM
Quote
Foobar2000 does support .m3u8, it's just a bit picky about the format. The file must contain a BOM and the path separator char must be "\"...

No, it is not necessary for the separator to be "\". It was my mistake to still use an exported playlist from mediamonkey(m3u) for testing which i renamed to "m3u8" and added a track with the character ñ afterwards.

the result was that this playlist was still saved with the coding "8 Bit" instead of "UTF-8" and "ñ" instead of "ñ" in the title of the added song which i noticed when i opened the playlist in the text editor and and took a look in the coding options.

After changing the coding to "UTF-8" and saving the playlist in the editor the "ñ" became "ñ" again and i can open it in the foobar2000 without problems.

And even more interesting: renaming the playlist to "m3u" does not seem to make any difference for rockbox. When the playlist is a UTF-8 one i can add the tracks with special characters as well and they do not get change, and there is no problem to import or open it in mediamonkey either :-)

Thanks a lot once more for your help!