View Full Version : Foreign Characters
aabellard
02-11-2007, 09:05 PM
Hi,
I am fetching data from a database and some of the data contains foreign characters (рящ etc). When I open the xml file from a browser, all the data gets displayed fine. However, when the xml file is now sent to Laszlo, I get squares for the french characters.
Could anyone help me with this please?
hardik
02-13-2007, 09:31 AM
Hello aabellard,
To display foreign characters, it is do with your encoding type,
pleae go thru this very important threads
http://forum.openlaszlo.org/showthread.php?t=2909&highlight=foreign+characters
http://forum.openlaszlo.org/showthread.php?t=3332&highlight=foreign+characters
hope this helps you to solve your problem,
Thanks,
Hardik
aabellard
02-13-2007, 09:54 AM
Thanks for your reply! Now I know that my database saves data in ISO-8859-1 . Is there a way for me to convert it from ISO-8859-1 to UTF-8 before sending the xml to Laszlo? I use a php/mysql backend.
Thanks!
hardik
02-13-2007, 10:07 AM
what you can do, when you are creating xml data file using PHP, you set your encoding type to UTF-8 and thats the bottom line, right?
Please read thru second thread I posted, some people tried converting XML encoding type thru scripting.
Hope this helps.
Thanks,
Hardik
trucker_
02-26-2007, 05:03 AM
Hi all,
I have the same problem, when the XML is in ISO-8859-1, the data is displayed correctly in the notepad but i get squares in laszlo. When the XML is in UTF-8 y get "?" in both laszlo and notepad.
I think the problem is in my scrip (PHP) or in the database (PostgreSQL) encoding...
aabellard
02-26-2007, 10:05 AM
Exactly. My database stores info as ISO-8859-1. Since I am gathering my data in PHP, I only used the utf8_encode function that they have available ( http://us3.php.net/utf8_encode ). If you also use php, just convert them all to utf-8 with this function and then feed it to Laszlo.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.