Danish letters get weird'ed when paased from HTML to db

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
soren
Forum Newbie
Posts: 14
Joined: Wed Oct 16, 2002 2:36 pm
Location: Denmark

Danish letters get weird'ed when paased from HTML to db

Post by soren »

When passing danish letters (such as æø and å) from a textfield in an HTML form to a database, its replaced by a 'code' - however, not the usual HTML code.

æ is converted into æ
ø is converted into ø
å is converted into Ã¥

Any ideas ??

Søren
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

PHP will automatically convert incoming html-encoded entities to the current character character set used on your host, the Scandinavian letters are in the upper (128+) ascii area and requires certain codepage for represantion, I am not sure what it is represented as in the ISO-sets commonly used on web hosts (honestly, I dont know much about charsets other than Ascii and Unicode), apparently your database server doesnt support the same codeset.. if you want it stored as html-entities, do a manual conversion before storage..
Some of the scandinavian newsgroups probably have a bunch about such (especially check no.it.* )
Post Reply