Connecting Tech Pros Worldwide Forums | Help | Site Map

Scpecial Chars - 'Ãi' to 'á' - charset

JoeAley2003
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi all...

I have a sql table that contains files saved with special chars i
think, for example, 'AmapÃi', where we expect 'Amapá'.

When i debug my var on phped, i see 'Amapá' and when i look at any
browser, netscape or IE i see 'AmapÃi'.

Anybody have a hint??? I don't know what to do...


Thank you all!!!

Daniel Tryba
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Scpecial Chars - 'Ãi' to 'á' - charset


JoeAley2003 <joealey2003@yahoo.com> wrote:[color=blue]
> When i debug my var on phped, i see 'Amap?' and when i look at any
> browser, netscape or IE i see 'Amap?i'.[/color]

The first ? is an iso-8859-1 character, the second one is utf-8 encoded.

If you'll send the proper content-type (charset=utf-8), your problem
will propably dissapear.

But best would be to figure out what you are really storing in the db!
Maybe you're seeing the information you expect in phped because that is
unicode aware, else some one/thing is translating out input/output
(mbstring of iconv could be doing that).

--

Daniel Tryba

Chung Leong
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Scpecial Chars - 'Ãi' to 'á' - charset


The second string is not proper utf8 text, since the high-order bit of the
second byte isn't set. Hopefully it's conversion problem in posting to the
newsgroup. Otherwise, Mr. JoeAley is looking at a database full of corrupted
data.

Uzytkownik "Daniel Tryba" <news_comp.lang.php@canopus.nl> napisal w
wiadomosci news:c3bntg$3fl$1@news.tue.nl...[color=blue]
> JoeAley2003 <joealey2003@yahoo.com> wrote:[color=green]
> > When i debug my var on phped, i see 'Amap?' and when i look at any
> > browser, netscape or IE i see 'Amap?i'.[/color]
>
> The first ? is an iso-8859-1 character, the second one is utf-8 encoded.
>
> If you'll send the proper content-type (charset=utf-8), your problem
> will propably dissapear.
>
> But best would be to figure out what you are really storing in the db!
> Maybe you're seeing the information you expect in phped because that is
> unicode aware, else some one/thing is translating out input/output
> (mbstring of iconv could be doing that).
>
> --
>
> Daniel Tryba
>[/color]


Closed Thread