Bug 9969 - Squeezecenter does not play ALAC tracks with accents in tags
: Squeezecenter does not play ALAC tracks with accents in tags
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.2.1
: PC Ubuntu Linux
: -- normal (vote)
: 7.x
Assigned To: Ross Levine
: charset_issues
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-11 14:53 UTC by Walker LaRon
Modified: 2009-07-31 10:31 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
log that shows that the problem is related to SC 7.2.1 (28.06 KB, application/octet-stream)
2008-11-24 09:34 UTC, andlauer
Details
pathfromfileurl behaviour (17.93 KB, application/octet-stream)
2008-11-24 09:35 UTC, andlauer
Details
ls -alR "/music/folder/subtree/Alain Bashung/" > bug9969-ls.txt (3.60 KB, text/plain)
2008-11-25 12:22 UTC, andlauer
Details
File names with accents are truncated :-( (51.41 KB, application/octet-stream)
2008-11-25 12:22 UTC, andlauer
Details
File names with accents are truncated :-( (8.44 KB, image/png)
2008-11-25 12:39 UTC, andlauer
Details
SC using ISO-8859-1 trying to play an ISO-8859 filename as UTF-8 (9.41 KB, application/octet-stream)
2008-11-25 15:54 UTC, andlauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walker LaRon 2008-11-11 14:53:02 UTC
Ticket ref #081110-000694

**Please note that this could be related to bug 9659 or 9430***

Environment:
Squeezecenter 7.2.1, Ubuntu Linux 8.10

Problem:
Squeezecenter does not play ALAC tracks with accents (à, é, ö, etc.)in their tags. 

The Server.log fills up with the following message (ten a second):

[08-11-08 15:19:32.0372] Slim::Utils::Misc::msg (1398) Warning: [15:19:32.0357] Use of uninitialized value in hash element at /usr/share/perl5/Slim/Player/Squeezebox.pm line 1215.

For example, Squeezecenter does not play the tracks from the 'Zauberflöte', or 'Bleu pétrole' albums (but iTunes does).
Comment 1 Michael Herger 2008-11-11 23:24:06 UTC
Right... all these bugs are reported against ubuntu 8.10? 

do you see the same issue with eg. bitrate limiting or other transcoded streams?
Comment 2 andlauer 2008-11-12 15:25:13 UTC
Hello!

I mostly have ALAC tracks, and I haven't had problems with MP3 tracks.

What is bitrate limiting? How do I find out?

Thank you, and regards, JC

Comment 3 James Richardson 2008-11-13 12:44:28 UTC
QA to verify
Comment 4 Ross Levine 2008-11-18 18:31:48 UTC
Can't reproduce. I played an alac file with an ñ in the artist tag, works fine with Ubuntu 8.10. Maybe we should get a sample file?

(In reply to comment #2)
> What is bitrate limiting? How do I find out?

From the SqueezeCenter web interface go to Settings - Player - Audio, you'll see Bitrate Limiting there. JC, are you LaRon's customer?
Comment 5 Ross Levine 2008-11-18 18:39:15 UTC
JC, LaRon tells me you're the customer in Ticket ref #081110-000694. 

Would you mind attaching a file of yours that doesn't play so I can have a look? I can't seem to reproduce this with the file I created, maybe there is something different about yours. Let me know if you need a hand, you can email me privately if you prefer. 
Comment 6 andlauer 2008-11-19 11:47:11 UTC
Hello,

I have sent a file to Ross via e-mail.

Thank you for support, and regards, JC
Comment 7 andlauer 2008-11-19 16:40:45 UTC
Hello!

1. I have tried to reinstall SC 7.2.1 on Ubuntu 8.0 Server: SC won't start (SC died. Restarting.).
2. I have reinstalled Ubuntu 8.0 from scratch, then reinstalled SC 7.2.1: SC won't start (SC died. Restarting.)
3. I have replaced SC 7.2.1 with the current unstable SC 7.3: SC won't start (SC died. Restarting.).

Starting SC-server 7.3 with --d_startup shows that the following modules fail to load: GD.

By the way, SC 7.2 does not ALAC under Linux (i.e. all my music).

None of the stable/testing/unstable version of squeezecenter is working here, I am at a loss, and all I would like is to listen to some music, instead of fixing software.

Please assist.

Regards,

Jean-Charles
Comment 8 Ross Levine 2008-11-19 16:45:06 UTC
This is not a valid bug, I'll close it now. 

JC, email me back I think I can help. 
Comment 9 andlauer 2008-11-19 17:13:17 UTC
Ross,

The problem. Maybe the accents in the tags is not the issue, but rather the fact that the filename contains the accents. I wanted to have SC scan only the Zauberflöte directory, but the SC interface would not let me select the Zauberflöte directory. In fact, it seems that SC won't let me select directories whose names  contain accentuated characters.

Could you please check that hypothesis.

Regards, JC
Comment 10 andlauer 2008-11-24 09:34:28 UTC
Created attachment 4327 [details]
log that shows that the problem is related to SC 7.2.1
Comment 11 andlauer 2008-11-24 09:35:32 UTC
Created attachment 4329 [details]
pathfromfileurl behaviour
Comment 12 andlauer 2008-11-24 09:36:45 UTC
Added log files as per Michael's request. The bug is closed though :-(
Comment 13 Ross Levine 2008-11-24 11:54:41 UTC
JC points out in an email to me there does seem to be an issue on line [08-11-23 12:21:19.2310], the path of the file is truncated when SC uses ALAC. Michael is this a charset_issue bug?
Comment 14 Michael Herger 2008-11-25 04:17:09 UTC
Ross - you had mentioned not being able to reproduce? Did you only test with an accented tag, or with a filename too?

JC - are you importing iTunes .xml file? How does the filename look on that Linux box? How did you transfer it to the linux box?
Comment 15 andlauer 2008-11-25 05:20:59 UTC
Hello all,

I am using the latest version of iTunes on Windows XP to manage my files. I then manually backup the files to an server running Ubuntu 8.10 using rsync. After the backup, I scan the updated files, without using the iTunes option.

rsync did not change recently, with respect to accents (a backup of the files with special characters would have been huge and I would have noticed it). alac plays the files correctly from the command line, when accented characters are typed in (as "Vénus" for example).

I am not in front of my Linux box right now. I am not sure about what you mean by "how does the filename look on the Linux box". Could you please be more specific and maybe give me a list of commands I could type (e.g ls -alR /iTunes > michael.txt).

Thank you for your patience, and regards, 

JC
Comment 16 Michael Herger 2008-11-25 11:47:56 UTC
> ls -alR /iTunes > michael.txt

That would be great. Plus a copy of what you see in Settings/Information. And if you have a GUI, whether those characters look ok in your file manager.
Comment 17 andlauer 2008-11-25 12:19:50 UTC
Hello,

Here is some information about SC:
Version du SqueezeCenter : 7.2.1 - 23630 @ Mon Oct 20 19:54:08 PDT 2008 - Debian - FR - utf8
Adresse IP serveur : 192.168.1.13
Version de Perl : 5.10.0 i486-linux-gnu-thread-multi
Version de MySQL : 5.0.67-0ubuntu6
Architecture de la plate-forme : i686-linux
Nom d'hôte : server
Port serveur : 9000
Platines identifiées : 1

Here is the output of the locale command:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I will send ls of a subtree of my music folder as well as an image of the corresponding SC web interface.

Regards, JC
Comment 18 andlauer 2008-11-25 12:22:01 UTC
Created attachment 4340 [details]
ls -alR "/music/folder/subtree/Alain Bashung/" > bug9969-ls.txt
Comment 19 andlauer 2008-11-25 12:22:58 UTC
Created attachment 4341 [details]
File names with accents are truncated :-(
Comment 20 Michael Herger 2008-11-25 12:36:37 UTC
I don't have Gimp on this machine. Would you mind uploading a .jpg or .png?

> ls -alR "/music/folder/subtree/Alain Bashung/" > bug9969-ls.txt

This doesn't look good to me. Do you see those characters in the shell?
Comment 21 andlauer 2008-11-25 12:37:33 UTC
> This doesn't look good to me. Do you see those characters in the shell?
yes

Comment 22 andlauer 2008-11-25 12:39:22 UTC
Created attachment 4342 [details]
File names with accents are truncated :-(
Comment 23 Michael Herger 2008-11-25 12:51:59 UTC
> > This doesn't look good to me. Do you see those characters in the shell?
> yes

I meant to ask: do you see them correctly?
Comment 24 andlauer 2008-11-25 12:55:00 UTC
dj@server:~$ sudo ls -alR "/srv/iTunes/iTunes Music/Alain Bashung/"
...
/srv/iTunes/iTunes Music/Alain Bashung/Bleu p?trole:
total 331952
drwxr-xr-x 2 media media     4096 2008-05-10 21:08 .
drwxr-xr-x 5 media media     4096 2008-05-10 21:04 ..
-rw-r--r-- 1 media media 59689494 2008-05-10 21:07 Comme un l?go.m4a
-rw-r--r-- 1 media media 30487986 2008-05-10 21:07 Hier ? Sousse.m4a
-rw-r--r-- 1 media media 21909658 2008-05-10 21:07 Il voyage en solitaire.m4a
-rw-r--r-- 1 media media 26697764 2008-05-10 21:07 Je t'ai manqu?.m4a
-rw-r--r-- 1 media media 45213547 2008-05-10 21:07 Je tuerai la pianiste.m4a
-rw-r--r-- 1 media media 24023752 2008-05-10 21:07 Le secret des banquises.m4a
-rw-r--r-- 1 media media 23789498 2008-05-10 21:07 R?sidents de la r?publique.m4a
-rw-r--r-- 1 media media 27858803 2008-05-10 21:07 Sur un trap?ze.m4a
-rw-r--r-- 1 media media 24245969 2008-05-10 21:07 Suzanne.m4a
-rw-r--r-- 1 media media 29972698 2008-05-10 21:07 Tant de nuits.m4a
-rw-r--r-- 1 media media 25595588 2008-05-10 21:07 V?nus.m4a
Comment 25 andlauer 2008-11-25 15:21:39 UTC
Hello!

The file names in my music library are (and always were) coded in ISO-8859-1. Until now it never had been a problem. Ubuntu and SqueezeCenter are (and always were) configured in UTF-8.

Just to test, I have configured Ubuntu and SqueezeCenter to use ISO-8859-1: the web interface displays the file names correctly, but files whose names contain accents still do not play.

I will try to provide a log about this.

Regards, JC
Comment 26 andlauer 2008-11-25 15:54:31 UTC
Created attachment 4347 [details]
SC using ISO-8859-1 trying to play an ISO-8859 filename as UTF-8

SC (Version du SqueezeCenter : 7.2.1 - 23630 @ Mon Oct 20 19:54:08 PDT 2008 - Debian - FR - iso-8859-1) accesses ISO-8859-1 filenames as UTF-8 filenames
Comment 27 andlauer 2008-11-25 17:33:42 UTC
Hello!

I found the cause of the problem! It is the following change:

http://svn.slimdevices.com/7.2/trunk/server/Slim/Player/TranscodingHelper.pm?r1=23157&r2=23382

To summarize:

with the fix to bug 9488, SC is unable to play files with ISO filenames containing special characters (whether Ubuntu/SC are configured to use ISO or UTF).

without the fix to bug 9488, SC is able to play files with ISO filenames containing special characters when Ubuntu/SC are configured to use UTF (but not when Ubuntu/SC are configured to use ISO).

I hope you will be able to find a solution to both bugs 9488 and 9969. Please tell me if I should test a fix.

In the mean time, I will be enjoying some of the music SC 7.2.1 had lost.

Regards, JC
Comment 28 andlauer 2008-11-25 17:52:16 UTC
BTW

Once the fix is reverted, the music plays fine.

In the WUI tracks appear correctly from the DB (i.e. Music>Artist>...) but file names are truncated when seen as files (i.e. Music>Music Folder>...).

Not a problem here: I do not use the Music Folder view, and I'd rather listen to my music files, than display their name ;-)

JC
Comment 29 Michael Herger 2008-11-26 01:24:35 UTC
I still don't know whether you see umlauts and accented characters correctly on your Linux box. IMHO they're corrupted during rsync transfer.
Comment 30 andlauer 2008-11-26 02:39:51 UTC
Michael,

I do not see the accents correctly on my Linux server, because the filenames are coded in ISO-8859 and my Linux server is configured in UTF-8.

The filenames are not corrupted by rsync, they are simply not converted from ISO-8859 (Windows) into UTF-8 (Ubuntu). This is not a problem for Linux: shell commands work fine for example (ls "Bleu pétrole", alac -r "Vénus", etc.). This was not a problem for SC, until version 7.2.1.

According to the code of TranscodingHelper, SC 7.2.1 always utf8decodes a file name, even when the file name is not UTF-8. This is the problem, IMHO.

Furthermore, it seems that the WUI of SC 7.2.1 also always utf8decodes a file name in order to display it, even when the file name is not UTF-8. This is also a problem, IMHO.

Finally, I remember being able to play MP3 files whose title contains an accent. I will try to reproduce and document that tonight.

Regards, JC.
Comment 31 Michael Herger 2008-11-26 03:10:14 UTC
> I do not see the accents correctly on my Linux server, because the filenames
> are coded in ISO-8859 and my Linux server is configured in UTF-8.

JC - don't get me wrong. But this is too much of an edge case to be fixed on our side. 

We do our best to read files from the disc in whatever encoding they are. And while the internal handling of the file names is correct, it will fail when we send it back to the OS, as we know it's expecting utf8 - what we will give it.

In the long term you'd be winning if you fixed the encoding issues on your system. 
Comment 32 Michael Herger 2008-11-26 03:13:18 UTC
BTW: did you try to run SC with "--charset=iso-8859-1" instead of "--charset=utf8"? (somewhere in the squeezecenter startup script)
Comment 33 andlauer 2008-11-26 04:36:47 UTC
Michael,

I had already switched Ubuntu/SC to ISO-8859-1, see comments 25 and 26:

The file names display correctly, but SC 7.2.1 does not play the file.

As is now obvious from the code of TranscodingHelper, and confirmed by attachment 4347 [details] in comment 26, SC always utf8decodes file names, even when SC is configured with CHARSET=ISO-8859-1. This inconsistency causes my problem, and is likely to produce similar problems on other Debian/Ubuntu boxes.

In fact, to be coherent:

On my box Ubuntu and SC should be configured to use ISO-8859-1 (consider it done),

AND

TranscodingHelper should be modified in such a way that a filename is utf8decoded under Debian/Ubuntu only if SC is configured with CHARSET=UTF-8 (and not if SC is configured with CHARSET=ISO-8859-1). I would have proposed a fix, if only I could program this language.

I therefore propose you to improve the test in TranscodingHelper (i.e. currently Slim::Utils::OSDetect::isDebian()) accordingly.

Thank you for your patience and understanding.

Regards, JC

Comment 34 Chris Owens 2009-07-31 10:31:46 UTC
Reduce number of active targets for SC