[Mono-list] Encoding problems

Aleksandar Dezelin dezelin32@fastmail.fm
Tue, 11 Jan 2005 08:32:54 +0100


Francisco Figueiredo Jr. wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Hi all,
>
> I received a report about problems with encoding on mono.
>
> The following text isn't being returned correctly from database:
>
> Magriñá
>
> The chars n-tilde and a-acute is appearing as strange chars.
>
> On mono 1.0.4 on linux if you change LANG to en_US the text reads
> correctly, with es_ES not.
>
> I tested here with svn version and with both en_US and es_ES it works.
> Only if I export LANG= it returns wrong chars. What is the default
> encoding when I don't set LANG?
>
> Do you know if there is any problem with 1.0.4 or 1.0.5 and if so if
> there is any fix?
>
> Thanks in advance.

What kind of database are you using? On Microsoft SQL server you have to 
use 'nchar' datatype for unicode strings, otherways you'll get incorect 
strings from the server. Mono has problems with string encodings.

Cheers,
Aleksandar Dezelin

-- 
Linux is like wigwam - no windows, no gates and apache inside. ...