Page 1 of 1

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

Posted: Thu Feb 13, 2003 2:50 pm
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

Posted: Thu Feb 13, 2003 6:22 pm
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.* )