
rune.evjen at gmail
Sep 23, 2010, 12:56 PM
Post #3 of 6
(297 views)
Permalink
|
2010/9/23 Nicolas Riendeau <knight at teksavvy.com> > > Hi! > > > I am working on a Norwegian translation of MythWeb from scratch. The aim > > is to have this ready by the end of the week, and include it with a > > Norwegian translation update which includes tranlsation updates to > > mythfrontend plus translation of all the plugins. > > Thank you! > > > > > I have translated most of the strings, but I get the following php > > errors on some of the pages: > > " > > Warning at /usr/share/mythtv/mythweb/includes/utils.php, line 195: > > !!NoTrans: htmlentities(): Invalid multibyte sequence in argument!! > > Hmm, sound like it doesn't like the encoding of some of your UTF-8 > strings... > > > > > I have checked that the "special" norwegian characters are encoded as > > UTF-8 in the .lang file, and googled back and forth on the error > > message. > > http://insomanic.me.uk/post/191397106/php-htmlspecialchars-htmlentities- > > invalid indicates that there is a bug in PHP for when this waring > > message is displayed, and when I set display_errors to true in php.ini > > the display of the warning goes away. > > Do you know which strings are affected in your translation? If you edit > them slightly to remove some or all special characters do you still get the > error? > > > This is on ubuntu lucid with php 5. > > > > Has anyone else run into this problem when translating MythWeb ? > > This warning is not triggered when language is set to English or Danish > > (Danish uses æøå as well in the translation). > > Does it seem to display Danish properly? > > (ie nothing out of the ordinary appears except for the fact that it's in > another language). > > My backend currently has what appears to be an hardware problem which I'm > hoping to fix tonight (by replacing what I think is the defective piece of > hardware) and if it fix the problem I could try to help you track down the > problem if you send me your MythWeb translation file. > > Good luck and have a nice day! Thank you Nicolas, I checked and double checked the .lang file, replaced all special characters, and verified the file encoding. But then I checked the Norwegian_NB.cat file, and there the answer was! file -i Norwegian_NB.cat Norwegian_NB.cat: text/plain; charset=iso-8859-1 After I updated the file with the correct encoding (and updating som regex strings) everything was fine. But it is a strange thing, since this is the output for the Danish translation: file -i Danish.cat Danish.cat: text/plain; charset=iso-8859-1 file -i Danish.lang Danish.lang: text/plain; charset=utf-8 ..and the Danish translation works fine. So possibly/probably/maybe I might have had a spelling error in the regex portion of the .cat file which I fixed in the convert-to-utf8-process. Thank you for the response and the help. Best regards, Rune
|