google-code-export / candydolldb

Automatically exported from code.google.com/p/candydolldb
0 stars 0 forks source link

Visible encoding artifacts #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Visit any page where non-ASCII chars like ä, é, ï, ó or ũ are used.
2. See how PHP serves the page with, for example ü translated to ü.

What is the expected output? What do you see instead?
I would like to see all output be as-is, that is in UTF-8.

Original issue reported on code.google.com by fwp...@gmail.com on 17 Jul 2012 at 2:58

GoogleCodeExporter commented 9 years ago
I thought, by converting all CDDB-files to UTF-8, we had solved this issue. 
Apparently not.

During testing of the new upload-functionality I stumbled across the Dutch word 
Geüload (uploaded) in an error-overlay.

I suspect the German translation would be littered with artifacts, were it 
operational.

Original comment by fwp...@gmail.com on 17 Jul 2012 at 3:00

GoogleCodeExporter commented 9 years ago
try wrapping the lang call in utf8_decode, like this 
utf8_decode($lang->g('ErrorXMLErrorNotValidSchema'))

i tested it with Dutch and it appeared to work fine

Original comment by mranimos...@gmail.com on 18 Jul 2012 at 7:36

GoogleCodeExporter commented 9 years ago
maybe write that into the lang function itself, so it decodes all language 
calls just in case

Original comment by mranimos...@gmail.com on 18 Jul 2012 at 7:37

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r579.

Original comment by fwp...@gmail.com on 18 Jul 2012 at 12:49

GoogleCodeExporter commented 9 years ago
Thanks for the suggested fix, added it in r579.

Original comment by fwp...@gmail.com on 18 Jul 2012 at 12:50

GoogleCodeExporter commented 9 years ago
Adding the utf_decode() to I18N::g() did help in the strings shown in overlays, 
but when I went to download_multi.php (Dutch), the é-characters were garbled 
into �.

Reopening the issue - hope this isn't such a pain in the $#! as issue 10...

Original comment by fwp...@gmail.com on 19 Jul 2012 at 11:21

GoogleCodeExporter commented 9 years ago
strange results from testing. geüploade only displays properly with 
utf8_decode, whereas the multidownload steps display properly without it.

Original comment by mranimos...@gmail.com on 20 Jul 2012 at 5:18

GoogleCodeExporter commented 9 years ago
Have made some changes in r588.

I replaced the offending characters with their respective HTML entities (in the 
Labels-classes), and added an encoding = 'UTF-8' to the CLI output calls (Info 
and Error).

Please give it a try, then we can mark this as closed.

Original comment by fwp...@gmail.com on 20 Jul 2012 at 8:56

GoogleCodeExporter commented 9 years ago
Looks good

Original comment by mranimos...@gmail.com on 21 Jul 2012 at 1:44