Encoding Problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Encoding Problems

Post by shiznatix »

Hey guys. Ok I am trying to display some different characters on this website. Actually, the letters are Finnish and Estonian characters so basically its o, a, u with dots and squiggles over them.

Now if you look at this page: http://tallinn.rakeback.com/about/

You will notice that there is an unknown character in the address and bank section. But! If you go here: http://tallinn.rakeback.com/omahakoulu everything displayed properly.

The encoding is the same. I send this header for every page: Content-Type: text/html; charset=utf-8
and I use this HTML header: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

So why does it show up on one page and not the other?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Tornim?e 7-11
Which character do you expect instead of the ?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

volka wrote:
Tornim?e 7-11
Which character do you expect instead of the ?
ä - an a with 2 dots.
mwasif
Forum Newbie
Posts: 13
Joined: Sun Jul 15, 2007 1:24 pm

Post by mwasif »

It is strange as i can clearly see the correct characters in HTML source. It seems to be a problem when ä and e come together. In the 2nd link, this sequence is not repeated.

Can you confirm this?
äe
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Looks like although the webserver claims the data utf-8 encoded it is iso-8859-1
It sends the bytes (in hex): 54 6F 72 6E 69 6D E4 65
which is the latin-1 encoding for Tornimäe
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

volka wrote:Looks like although the webserver claims the data utf-8 encoded it is iso-8859-1
It sends the bytes (in hex): 54 6F 72 6E 69 6D E4 65
which is the latin-1 encoding for Tornimäe
So basically I have to change the encoding of the file itself?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

With charset=iso-8859-1 it seems to be ok.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

Ok so I just coppied the html from the template that is called on that page, then deleted the template, created a new file and pasted the content into the new file. Now it works.
Post Reply