Connecting Tech Pros Worldwide Forums | Help | Site Map

accent problem with é è à ù

JB
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi,

I'm having a problem with accent in PHP/HTML.

I have a value stored in a table.
The value is : é è à ù
When I look directly into table via phpmyadmin, the value seems to be
stored correctly.
Yet, when I try to get the value in my php code (mysql_query() ... ),
what I get is totally different for the three lasts characters.

I get the 'é' correctly, but the other characters are transformed into
special characters : a 'c' with a special accent: an inverted ^ ), an
'r' with an accent, and a 'u' with a square on top of it.

I tried to use addslashes() or stripslashes() but it didn't changed
the problem at all.

Does anybody have any idea about what is happening?

Thanks.

JB isnardon

Bruno Desthuilliers
Guest
 
Posts: n/a
#2: Jul 17 '05

re: accent problem with é è à ù


JB wrote:[color=blue]
> Hi,
>
> I'm having a problem with accent in PHP/HTML.
>
> I have a value stored in a table.
> The value is : é è à ù
> When I look directly into table via phpmyadmin, the value seems to be
> stored correctly.
> Yet, when I try to get the value in my php code (mysql_query() ... ),
> what I get is totally different for the three lasts characters.
>
> I get the 'é' correctly, but the other characters are transformed into
> special characters : a 'c' with a special accent: an inverted ^ ), an
> 'r' with an accent, and a 'u' with a square on top of it.
>
> I tried to use addslashes() or stripslashes() but it didn't changed
> the problem at all.
>
> Does anybody have any idea about what is happening?[/color]

Probably a problem with character encoding in the html page that
displays the results...

My 2 cents
Bruno

somaBoy MX
Guest
 
Posts: n/a
#3: Jul 17 '05

re: accent problem with é è à ù



"JB" <jeanbaptiste_isnardon@yahoo.fr> wrote ...
: I get the 'é' correctly, but the other characters are transformed into
: special characters : a 'c' with a special accent: an inverted ^ ), an
: 'r' with an accent, and a 'u' with a square on top of it.
:
: I tried to use addslashes() or stripslashes() but it didn't changed
: the problem at all.
:
: Does anybody have any idea about what is happening?

Try:

$string = "\* your query result here *\";
echo utf8_encode($string);

It might just do the trick.


..soma


Closed Thread