RE: French character string encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Angelo Zanetti wrote:

> Your � didn't display properly at all - I tried ISO-8859-1 and
> UTF8.
> 
> /Per Jessen, Zürich
> 
> 
> Hi Per that’s the problem I am having, this is how data from a project
> I inherited is saved in the DB and I cant get it to show.

Hi Angelo

what's the charset of your database table?  Do e.g. "SHOW CREATE TABLE
xxxxx" in mysql to see what the table is stored as. 

> However I get normal data eg: ème est très haute. To show if its saved
> like that in the DB, I just do:
> 
> echo utf8_encode("ème est très haute.");

OK, all of that came through fine in ISO-8859-1 as quoted-printable. 
And yes, if you to put that in a UTF-8 page, utf8_encode() would be the
right thing. 

> and it works well. Is there anyway you think I can get the data in the
> DB to format correctly perhaps using some sort of string command?

Find out what charset the database is stored in - if it's ISO-8859-1 or
a close relative (which I suspect), you need to either serve your pages
as ISO-8859-1 or convert to UTF-8 using e.g. utf8_encode() and serve
the pages as UTF-8. 

Have you got a sample I can look at?  (feel free to send me URLs
off-line).


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux