Bug 6689 - UTF-8 not rendered correctly on web browser
: UTF-8 not rendered correctly on web browser
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.0
: PC Linux (other)
: P4 normal (vote)
: 7.x
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-20 21:16 UTC by quiet.dragon
Modified: 2009-09-08 09:18 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
See Music Scan Details to see ? ? ? instead of UTF-8 characters (115.00 KB, image/jpeg)
2008-01-28 20:28 UTC, quiet.dragon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description quiet.dragon 2008-01-20 21:16:51 UTC
The view of the scanner progress (Music Scan Details) on the web interface does not render
file names with UTF-8 (for example: 周華健/光 陰似健 1987 - 1997/01 我祈求.flac) correctly.

It shows them as various combinations of question marks (eg ?? )
Comment 1 Michael Herger 2008-01-21 05:12:53 UTC
Just to make sure I do understand you right: this is only in the scanner progress page?
Comment 2 quiet.dragon 2008-01-21 20:12:47 UTC
(In reply to comment #1)
> Just to make sure I do understand you right: this is only in the scanner
> progress page?

This particular problem (with the ?? replacing Asian font) is just on the scanner page.

I have other UTF8 problems, but they are logged with separate defect ids.
Comment 3 Michael Herger 2008-01-25 02:31:31 UTC
Do you see this issue in all skins or Default only?
Comment 4 Michael Herger 2008-01-25 02:36:25 UTC
Would removing the utf8decode from ajaxProgress.txt fix the issue for you?

Index: /Users/mh/Documents/workspace/SC7.0/HTML/EN/ajaxProgress.txt
===================================================================
--- /Users/mh/Documents/workspace/SC7.0/HTML/EN/ajaxProgress.txt	(revision 16744)
+++ /Users/mh/Documents/workspace/SC7.0/HTML/EN/ajaxProgress.txt	(working copy)
@@ -7,7 +7,7 @@
 Active[% num %]|[% IF item.obj.active %][% "RUNNING" | string %][% ELSE %][% "COMPLETE" | string %][% END %]
 Time[% num %]|[% item.time %]
 Bar[% num %]|[% item.bar %]
-Info[% num %]|[% item.obj.info | utf8decode | html %]
+Info[% num %]|[% item.obj.info | html %]
 
 [% num = num +1 %]
 
This would be reversal of change 12313...
Comment 5 Michael Herger 2008-01-25 04:31:48 UTC
Sorry, that was the wrong file. The change is still the same, but in Default/ajaxProgress.txt:

Index: /Users/mh/Documents/workspace/Teststoff/HTML/Default/ajaxProgress.txt
===================================================================
--- /Users/mh/Documents/workspace/Teststoff/HTML/Default/ajaxProgress.txt	(revision 16744)
+++ /Users/mh/Documents/workspace/Teststoff/HTML/Default/ajaxProgress.txt	(working copy)
@@ -7,7 +7,7 @@
 			'Active':'[% IF item.obj.active %][% "RUNNING" | string | replace("'", "%27") %][% ELSE %][% "COMPLETE" | string | uri | replace("'", "%27") %][% END %]',
 			'Time':'[% item.time %]',
 			'Bar':'[% item.bar %]',
-			'Info':'[% item.obj.info | utf8decode | uri | html | replace("'", "%27") %]'
+			'Info':'[% item.obj.info | uri | html | replace("'", "%27") %]'
 		}[% IF !loop.last; ","; END; END %]
 	],
 	'message':'[% message %]',
Comment 6 Michael Herger 2008-01-28 03:55:36 UTC
Earl - did you have a chance to test this?
Comment 7 quiet.dragon 2008-01-28 09:17:28 UTC
(In reply to comment #6)
> Earl - did you have a chance to test this?


Michael, sorry I missed this one.

I'll try it out tonight.
Comment 8 quiet.dragon 2008-01-28 20:28:55 UTC
Created attachment 2763 [details]
See Music Scan Details to see ? ? ? instead of UTF-8 characters
Comment 9 quiet.dragon 2008-01-28 20:30:42 UTC
(In reply to comment #6)
> Earl - did you have a chance to test this?


I applied this patch, but it didn't fix the problem. See attachment for picture of output text.


--- HTML/Default/ajaxProgress.txt.orig  2007-12-19 10:34:28.000000000 -0800
+++ HTML/Default/ajaxProgress.txt       2008-01-28 20:17:15.000000000 -0800
@@ -7,9 +7,10 @@
                        'Active':'[% IF item.obj.active %][% "RUNNING" | string | replace("'", "%27") %][% ELSE %][% "COMPLETE" | string | uri | replace("'", "%27") %][% END %]',
                        'Time':'[% item.time %]',
                        'Bar':'[% item.bar %]',
-                       'Info':'[% item.obj.info | utf8decode | uri | html | replace("'", "%27") %]'
+                       'Info':'[% item.obj.info | uri | html | replace("'",
+"%27") %]'
                }[% IF !loop.last; ","; END; END %]
        ],
        'message':'[% message %]',
        'total_time':'[% total_time %]'
-}
\ No newline at end of file
+}


Comment 10 Michael Herger 2008-01-29 00:53:14 UTC
Dean - I doubt I'll be able to fix this for 7.0. I'm having a hard time reproducing. I'll need some more material to test with to get the visual feedback myself. The couple of Chinese/Cyrillic/Hebrew songs I have to test with often don't show up as they drop between the update interval...

It's a cosmetic issue which we'll have to fix, but which doesn't render 7.0 useless. Ok?
Comment 11 Michael Herger 2008-01-29 00:53:35 UTC
Wallace - are you able to reproduce this issue? Could you provide me with some more Chinese songs to test this with?
Comment 12 Michael Herger 2008-01-30 04:43:33 UTC
punting post 7.0
Comment 13 Michael Herger 2008-03-18 07:12:33 UTC
Earl - I've checked in a few encoding/scanning related changes the past few days. Could you please give the latest nightly build another try? Is this still an issue for you?
Comment 14 quiet.dragon 2008-03-18 09:45:15 UTC
(In reply to comment #13)
> Earl - I've checked in a few encoding/scanning related changes the past few
> days. Could you please give the latest nightly build another try? Is this still
> an issue for you?
> 

Not a big issue for me.

I'll try to find time to try this out again.

It won't be until next week, I think.
Comment 15 Michael Herger 2008-03-27 03:37:50 UTC
Fixed in change 18073 - data wasn't utf8 encoded when stored in the DB.
Comment 16 James Richardson 2008-05-07 13:36:58 UTC
Earl: please open a new bug if you find more instances of UTF-8 errors
Comment 17 quiet.dragon 2008-05-07 16:00:15 UTC
Will do.
Comment 18 James Richardson 2008-05-15 12:27:14 UTC
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1

Please try that version, if you still see the error, then reopen this bug.

To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html
Comment 19 Chris Owens 2009-07-31 10:16:19 UTC
Reduce number of active targets for SC