Re: UTF-8 encoding decoding not working with Danish characters
/LarsM/:
[color=blue][color=green][color=darkred]
>>> My XML document is generated from the contents of a MySQL database. It is UTF-8 encoded.
>>>
>>> However, the Danish special characters appear wrong.
>>>
>>> For example the letter å becomes "Ã¥", the letter ø becomes "ø"
>>>
>>> See an examle here:
>>> http://netm.dk/blog/rss/index_rss2.xml[/color]
>>
>> Sound like an MySQL configuration issue, to me.[/color]
>
> Sorry, but excactly how do I set that setting, which Nick Kew and Henry
> Sivonen suggested?
>
> I have been reading through the RFC, but it is not completely clear to me...[/color]
Please, quote at least some relevant text from the post you're
replying to.
What I've meant is, AFAIK MySQL versions prior 4.1 doesn't handle
Unicode characters. I have no experience with the 4.1 version but
seems the encoding configuration could be tricky with it, too.
It could happen that a text is inserted into the DB using some
encoding and read using another (depending on the connection driver
configuration) producing different results. So, I guess, somehow the
info is inserted UTF-8 encoded but then read using ISO-8859-1, for
example. Generally it has nothing to do with RFCs but MySQL specific
configuration.
I've worked on an application which used MySQL 4.0 as data store and
because it was targeted for the Japanese market we had to configure
the connection driver specifically to encode/decode using a
Shift_JIS encoding.
--
Stanimir
/LarsM/:
[color=blue][color=green][color=darkred]
>>> My XML document is generated from the contents of a MySQL database. It is UTF-8 encoded.
>>>
>>> However, the Danish special characters appear wrong.
>>>
>>> For example the letter å becomes "Ã¥", the letter ø becomes "ø"
>>>
>>> See an examle here:
>>> http://netm.dk/blog/rss/index_rss2.xml[/color]
>>
>> Sound like an MySQL configuration issue, to me.[/color]
>
> Sorry, but excactly how do I set that setting, which Nick Kew and Henry
> Sivonen suggested?
>
> I have been reading through the RFC, but it is not completely clear to me...[/color]
Please, quote at least some relevant text from the post you're
replying to.
What I've meant is, AFAIK MySQL versions prior 4.1 doesn't handle
Unicode characters. I have no experience with the 4.1 version but
seems the encoding configuration could be tricky with it, too.
It could happen that a text is inserted into the DB using some
encoding and read using another (depending on the connection driver
configuration) producing different results. So, I guess, somehow the
info is inserted UTF-8 encoded but then read using ISO-8859-1, for
example. Generally it has nothing to do with RFCs but MySQL specific
configuration.
I've worked on an application which used MySQL 4.0 as data store and
because it was targeted for the Japanese market we had to configure
the connection driver specifically to encode/decode using a
Shift_JIS encoding.
--
Stanimir
Comment