Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Playlist trouble with UTF8
« previous next »
  • Print
Pages: [1]

Author Topic: Playlist trouble with UTF8  (Read 7509 times)

Offline APz

  • Member
  • *
  • Posts: 8
Playlist trouble with UTF8
« on: October 12, 2007, 11:43:29 AM »
Many of the files in my iRiver H120 have scandinavian letters (ä, ö and å) in the filenames. They are mostly encoded latin-1, but some are UTF-8. I've noticed, that I can't add files with latin-1 encoded scands in their names. After trying to play those files, they seem to have utf-8 encoded names in the playlist and (ERR) before the filename. Is this a known problem?
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: Playlist trouble with UTF8
« Reply #1 on: October 12, 2007, 11:53:25 AM »
Quote from: APz on October 12, 2007, 11:43:29 AM
Many of the files in my iRiver H120 have scandinavian letters (ä, ö and å) in the filenames. They are mostly encoded latin-1, but some are UTF-8.
This is not possible. VFAT uses UCS-2 to encode the filenames, you can't simply use utf8. If you have different encodings for the filenames something is for sure broken with the filenames.

Quote
I've noticed, that I can't add files with latin-1 encoded scands in their names. After trying to play those files, they seem to have utf-8 encoded names in the playlist and (ERR) before the filename. Is this a known problem?
Rockbox creates playlists using utf-8. Those playlists get the extension "m3u8". The format is identical to m3u  but it uses utf-8 encoding. If you create playlists on the PC make sure to either create them using utf-8 and use the extension m3u8 or create them using latin-1 and set the codepage setting in Rockbox to latin-1 (and use the file extension m3u).
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline APz

  • Member
  • *
  • Posts: 8
Re: Playlist trouble with UTF8
« Reply #2 on: October 13, 2007, 02:06:18 PM »
Quote
Rockbox creates playlists using utf-8. Those playlists get the extension "m3u8". The format is identical to m3u  but it uses utf-8 encoding. If you create playlists on the PC make sure to either create them using utf-8 and use the extension m3u8 or create them using latin-1 and set the codepage setting in Rockbox to latin-1 (and use the file extension m3u).
I've now set the codepage in Rockbox to Latin1. Still, when I add files to playlist, they won't play and have "(ERR)" before their filenames, and the names show raw utf-8 characters in Rockbox's "view playlist" list.

The interesting part is, that you can play those files if you just select a file from a directory and just play it; but if I add files to the playlist that was generated by the previous action, the newly added files show the raw UTF-8 characters and won't play.
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: Playlist trouble with UTF8
« Reply #3 on: October 13, 2007, 07:01:43 PM »
Quote from: APz on October 13, 2007, 02:06:18 PM
I've now set the codepage in Rockbox to Latin1. Still, when I add files to playlist, they won't play and have "(ERR)" before their filenames, and the names show raw utf-8 characters in Rockbox's "view playlist" list.
errr ... how exactly did you create that playlist? If I understand correctly you did that on the player and not the PC or have I understood it wrong?
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline APz

  • Member
  • *
  • Posts: 8
Re: Playlist trouble with UTF8
« Reply #4 on: October 15, 2007, 08:46:39 AM »
Quote from: bluebrother on October 13, 2007, 07:01:43 PM
Quote from: APz on October 13, 2007, 02:06:18 PM
I've now set the codepage in Rockbox to Latin1. Still, when I add files to playlist, they won't play and have "(ERR)" before their filenames, and the names show raw utf-8 characters in Rockbox's "view playlist" list.
errr ... how exactly did you create that playlist? If I understand correctly you did that on the player and not the PC or have I understood it wrong?
I used only the player itself.

Here's a quick way to reproduce the problem:

Have a directory with just couple of files in it, every file having atleast one scandinavian letter in their names.

1) Open the file browser, select one of the songs. Rockbox will ask if I want to lose the dynamic playlist, I hit the navi-button and the song starts to play.
2) I enter the file browser again, select the very same song I selected earlier, hold the navi button on it for a longer time to get the context menu. I then select playlist and insert to playlist.

Now I have a playlist, with the same same song twice, except the first attempt works and the latter won't.

This was the main "WTF"-moment for me :)
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Playlist trouble with UTF8
« Reply #5 on: October 15, 2007, 02:28:53 PM »
Strange behavior indeed, but I can't reproduce it. Bluebrother is probably right, there's something strange with the filesystem.

What happens if you save the playlist, does it show the same behavior?

In any case, I'd like a copy of such a playlist, as well as the file .rockbox/.playlist_control (as it is after step 2). I might not be able to do anything about it, but it would be interesting to see the files anyway.
Logged

Offline APz

  • Member
  • *
  • Posts: 8
Re: Playlist trouble with UTF8
« Reply #6 on: November 10, 2007, 11:28:18 AM »
Quote from: bluebrother on October 12, 2007, 11:53:25 AM
Quote from: APz on October 12, 2007, 11:43:29 AM
Many of the files in my iRiver H120 have scandinavian letters (ä, ö and å) in the filenames. They are mostly encoded latin-1, but some are UTF-8.
This is not possible. VFAT uses UCS-2 to encode the filenames, you can't simply use utf8. If you have different encodings for the filenames something is for sure broken with the filenames.

The files were produced by the "abcde" script, and have utf-8 in their filenames. I simply copied them to the iRiver, and doing "ls" shows them correctly, atleast on Linux's side. Browsing the files in Rockbox shows the filenames as "raw" utf-8, but seeing no harm in this (as I'm more interested in the tags, and they do show up correctly) I never bothered to rename anything.

I've attached a "screenshot" of how the filenames show up after being added into a freshly created playlist. They play just fine, until the playlist is saved.

* rockbox-utf8-filenames.jpg (20.66 kB, 400x314 - viewed 308 times.)
Logged

Offline APz

  • Member
  • *
  • Posts: 8
Re: Playlist trouble with UTF8
« Reply #7 on: November 10, 2007, 11:36:46 AM »
Quote from: Lear on October 15, 2007, 02:28:53 PM
Strange behavior indeed, but I can't reproduce it. Bluebrother is probably right, there's something strange with the filesystem.
What happens if you save the playlist, does it show the same behavior?
In any case, I'd like a copy of such a playlist, as well as the file .rockbox/.playlist_control (as it is after step 2). I might not be able to do anything about it, but it would be interesting to see the files anyway.
Adding the the files into a fresh playlist allows playing them, but saving the playlist and then reloading it will cause all the files with UTF-8 in their filenames to have the (ERR) in their filenames.

I've attached a small "screenshot" what happens after the playlist is reloaded, and the playlist itself. The playlist had to be renamed to .txt as the forum didn't accept the original filename :/
* test.txt (0.93 kB - downloaded 168 times.)

* rockbox-utf8-filenames-problem.jpg (20.62 kB, 400x317 - viewed 345 times.)
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Playlist trouble with UTF8
« Reply #8 on: November 12, 2007, 11:34:29 AM »
Hm, the utf-8-encoded filenames seem to get corrupted when written to (or possibly read from) disk, but I can't really see how. I'd understand it if you saved the playlist with an ".m3u" extension, but that doesn't explain the other case (where inserting a track in the playlist cause the same behavior). Getting a copy of ".rockbox/.playlist_control" from before the playlist has been saved might help...
Logged

Offline markun

  • Developer
  • Member
  • *
  • Posts: 462
Re: Playlist trouble with UTF8
« Reply #9 on: November 12, 2007, 11:45:09 AM »
I suspect that the drive is mounted with the wrong codepage settings. Do you mount with " -o iocharset=utf8" when you copy UTF-8 encoded files? I would advise you to have all your filenames in the same encoding btw, makes life easier.

But I also don't understand how the same file ends up in the playlist with 2 different encodings. Sounds like a bug in rockbox to me.
« Last Edit: November 12, 2007, 11:50:08 AM by markun »
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Playlist trouble with UTF8
« Reply #10 on: November 12, 2007, 02:49:26 PM »
Quote from: markun on November 12, 2007, 11:45:09 AM
But I also don't understand how the same file ends up in the playlist with 2 different encodings. Sounds like a bug in rockbox to me.
In this case, the two files are added using very different code paths. When starting playback, the code is simple, the name is just copied to a buffer. When inserting a new track however, things get more complicated, involving writing it to the playlist control file. Don't really see how that could affect things though.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Playlist trouble with UTF8
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.088 seconds with 14 queries.