Sorting Umlauts ?

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
tchristian
Forum Newbie
Posts: 2
Joined: Mon Sep 15, 2008 2:56 am

Sorting Umlauts ?

Post by tchristian »

Hello Guys,

I am new here. And I need help on sorting umlauts (german umlauts). So, in the database I have stored the O Umlauts using the HTML: "Ö". Now, it will be a problem when I am trying to sort the list.

Any suggestions on sorting Umlauts ?

Thanks a lot,
Chris
tchristian
Forum Newbie
Posts: 2
Joined: Mon Sep 15, 2008 2:56 am

Re: Sorting Umlauts ?

Post by tchristian »

So, I finally made my database into UTF-8, and it did sort correctly, but the browser does not display it correcly, such as A1`/4 or something like that if you have ever saw it...

And, at my browser, I went to VIEW --> Encoding --> and set it to UTF-8....so, it has to be displayed manually, what if someone opens a browser and he/she does not know how to set the encoding ? I would really like to do it automatically.

Any ideas how to set Browser Encoding from the script (PHP or Javascript) ?

Thanks,
Chris
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Re: Sorting Umlauts ?

Post by jmut »

If changing broswer encoding options works for you then I guess this

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
should do... put in head tag.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Sorting Umlauts ?

Post by VladSun »

Code: Select all

header('Content-type: text/html; charset=UTF-8');
The META-tag has no effect if a HTTP header is send.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply