Bug 1774 - Browse music folders does not show special characters
: Browse music folders does not show special characters
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Tagging
: 6.1.0
: PC Linux (other)
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-06 22:47 UTC by Michael Herger
Modified: 2011-03-16 04:19 UTC (History)
0 users

See Also:
Category: ---


Attachments
correctly display special characters (1.42 KB, patch)
2005-07-13 00:29 UTC, Michael Herger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2005-07-06 22:47:51 UTC
Current test on Linux - DE - iso-8859-1

Accented characters display correctly in the lists: I can open the "Am�lie Poulain" folder, songs are 
correctly shown. But the top link "Home/Music folder/Am,lie Poulain" or the top line on the player don't 
show the accents (dito for Bj�rk, Ohrew�rm et al., of course)

When, on the player, I go into the song details, everything's fine again, even the top line.

Using the file.ext format on the player would not display accented characters in the normal browse 
mode, though they do in BMF.

Normal genre/album/artist browse in the web interface is ok.

While browsing these folders I get quite a few of the following errors:

Malformed UTF-8 character (unexpected non-continuation byte 0x6c, immediately after start byte 0xe9) 
in substitution (s///) at /home/mh/eclipse/SVN/Slim/Display/Display.pm line 55.
Malformed UTF-8 character (unexpected non-continuation byte 0x6c, immediately after start byte 0xe9) 
in substitution (s///) at /home/mh/eclipse/SVN/Slim/Display/Display.pm line 84.
Comment 1 Dan Sully 2005-07-07 11:59:20 UTC
Michael - is this with perl 5.6 or perl 5.8 ?
Comment 2 Michael Herger 2005-07-07 16:48:23 UTC
5.8.5 on Mandrake 10.1 and 5.8.6 on DSL/Knoppix/Debian. I don't use 5.6.x for slimserver any more.
Comment 3 Michael Herger 2005-07-13 00:29:55 UTC
Created attachment 627 [details]
correctly display special characters

Possible fix for correct encoding in BMF mode.
Comment 4 Dan Sully 2005-07-13 10:28:46 UTC
Michael - if this works for you, go ahead and check it in. Looks good from here.
Comment 5 Dan Sully 2005-07-13 10:51:33 UTC
Hmm.. that doesn't work for me. The top line is messed up in the web ui 
Comment 6 Michael Herger 2005-07-13 11:22:49 UTC
And you're using utf8 on your system? Do we have to guess/check this before 
disabling utf8? I've seen similar things in other parts of the code.
Comment 7 Dan Sully 2005-07-13 11:29:20 UTC
Michael - can you add this addition, and see if it works for your system?

Index: Slim/Utils/Misc.pm
===============================================================
====
--- Slim/Utils/Misc.pm  (revision 3684)
+++ Slim/Utils/Misc.pm  (working copy)
@@ -309,7 +309,7 @@
 sub utf8off {
        my $string = shift;
 
-       if ($string && $] > 5.007) {
+       if ($string && $] > 5.007 && looks_like_utf8($string)) {
                Encode::_utf8_off($string);
        }
 
Comment 8 Michael Herger 2005-07-13 11:37:48 UTC
I'm afraid, it does not, neither with nor without my patch.
Comment 9 Dan Sully 2005-07-13 11:41:54 UTC
  Ok - can you add in "sub utf8off":

use Devel::Peek;
print Dump($string)

and send me the output of one of the busted strings?

Thanks
Comment 10 Michael Herger 2005-07-13 12:32:22 UTC
SV = PV(0x9947cd4) at 0x8954a4c
  REFCNT = 1
  FLAGS = (PADBUSY,PADMY,POK,pPOK,UTF8)
  PV = 0xa7efe40 "Am\351lie Poulain - Le Fabuleux Destin d'Am\351lie Poulain"\0Malformed UTF-8 
character (unexpected non-continuation byte 0x6c, immediately after st
art byte 0xe9) in subroutine entry at /ramdisk/opt/slimserver/Slim/Utils/Misc.pm line 313.
Malformed UTF-8 character (unexpected non-continuation byte 0x6c, immediately after start byte 0xe9) 
in subroutine entry at /ramdisk/opt/slimserver/Slim/Utils/Misc.p
m line 313.
 [UTF8 "Am\x{0}e Poulain - Le Fabuleux Destin d'Am\x{0}e Poulain"]
  CUR = 52
  LEN = 53
Malformed UTF-8 character (unexpected non-continuation byte 0x6c, immediately after start byte 0xe9) 
in pattern match (m//) at /ramdisk/opt/slimserver/Slim/Utils/Misc.pm line 343.

(tons of that last one)
Comment 11 Dan Sully 2005-07-19 14:03:18 UTC
Michael - pushing this off to post 6.1
Comment 12 Dan Sully 2005-08-10 23:55:52 UTC
Michael - is this still an issue with the 6.2 trunk code?
Comment 13 Michael Herger 2005-08-11 03:48:58 UTC
Wow... updated my SVN copy for the first time in about two weeks (am/was on a vacation) - more than 130 
files updated! I don't know which of your many changes did the trick but it's fine now. BMF on the player 
as in the web interface does show the umlauts and accents. Thanks a lot! 

I'll mark as fixed.