When I put in a textarea some french charactes, when I get them back
with a SQL request, all is correct.
With phpMyAdmin, in the database, I can see this:
Et voilà que la star de l\'Internet met cette fois la voûte
céleste à portée de souris grâce à une nouvelle option baptisée
But on another server, with the same PHP code, in the database I have
this:
Et voilà que la star de l'Internet met cette fois la voûte
céleste à portée de souris grâce à une nouvelle option baptisée
Knowing that the PHP code is the same and the browsers too, which
difference in the config files (PHP or MySQL) can affect the
characters ?
Thanks,
Vincent.
I'd say more probably MySQL.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================
Ok, I do
$body = htmlentities($body, ENT_NOQUOTES, "UTF-8") ;
And this works...
Actually there was some troubles because I must do an urlencode of the
$body variable.
:)
Vincent.
>Ok, I do
> $body = htmlentities($body, ENT_NOQUOTES, "UTF-8") ;
>And this works...
Shouldn't be necessary.
>Actually there was some troubles because I must do an urlencode of the
>$body variable.
Huh? Why?
Your problem is caused by an improper encoding declaration somewhere. If
you want to use UTF-8, you have to
* store the data in UTF-8 columns in the database
* make sure the connection to the DB uses UTF-8 when inserting and
fetching data
* return the page to the browser with a proper charset parameter in its
HTTP Content-Type header
I'm also wondering about this from your first posting:
| Et voilà que la star de l\'Internet met cette fois la voûte
Where's the backslash coming from? It shouldn't be there. Was it just a
display problem or is it really stored like that in the DB?
Micha