Hey to all! I'm currently building a site where I've created a component that only includes lexicon files (en and fr). I have several hundred entries that have been translated into french, and the translator was kind enough to actually enter the translations directly into the array values in the .inc.php files for me.
However any time there are accented characters, they do not render on page correctly (that question mark in a diamond thing). I checked in the lexicon management panel in the manager, and any time there's a special character it displays NULL as the value. If I enter the value into the lexicon manager, it's fine (of course I realized this gets entered into the DB for the lexicon value).
I have modified other lexicon values from other components, adding a special character here and there and there is no issue.
Are there other steps in registering the lexicon files that I'm missing to be able to handle UTF-8 characters? Having to do this all by hand is something I don't have time for right now- behind on the project.
Any ideas will be greatly appreciated!
I've also had this trouble with translated files. The problem is that lexicon files should be in UTF-8 encoding. They are probably encoded in the native format of the translator's computer.
Some text editors will recognize the original encoding when loading the files, but let you specify the encoding for saving them. Loading them in such an editor (on the same platform the translator was using, if possible) and then saving them as UTF-8 is probably the best solution. Whatever you do, do *not* use any Microsoft program or utility for this. Microsoft's idea of unicode encoding is not what you want.
I think NetBeans may work for this and I'm pretty sure Nusphere's PhpEd does as well.
BobRay-
Thanks for the response! I actually was on the modx irc channel and someone suggested the same thing. Yep, my editor was using the OS default charset- that was the problem! I'm able to change the document charset and the global charset for saving- that's all done, all in UTF-8 now.
Great editor I have, BTW- called komodoEdit. They have a pay-for full IDE, but the editor alone is quite powerful and completely FREE with no restrictions, timeouts, etc. Y'all should give it a good look for non-IDE need coding!
All is well- thanks again!
Bob-
Oh, and just to let you know: your site with the references for revo objects totally SAVES MY BUTT every day! SO AWESOME to have everything there, easy to reference to!
THANKS A TON!!!!
I'm glad you got it sorted. Thanks for the kind words.