Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 14, 2006, 3:17 pm
rate this thread
I am fighting with my MysQL database in order to get french and
cyrillic characters properly displayed on my website. I've created
tables with latin1 charset. My Perl script on the webserver worked fine
until I have added Unicode support. I saved the script file in Unicode
UTF-8 format, and added
Content-type: text; charset=3Dutf-8/html\n\n
<META HTTP-EQUIV=3D"CONTENT-TYPE" content=3D"text/html; charset=3Dutf-8">
to print the HTML headers. Now I can display french _and_ cyrillic
characters, which are stored in strings inside the script.
Unfortunately the strings coming from my MySQL database via DBI are no
longer displayed properly on the website. Characters like
=E9 (é) are displayed as chinese or so.
I was reading many postings and I tried many things like
encode:decode("utf8", $string) in my Perl script and "SELECT
CONVERT(data USING utf8) AS data1 FROM test;" to select data from the
database, but still I'm not able to solve the problem.
I found out that the strings inside my script are UTF-8 coded, but the
string I get from the tables are not.
Can anybody help getting this thing working?
Thanks in advance
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum