[Mono-list] Encoding problems

Francisco Figueiredo Jr. fxjrlists@yahoo.com.br
Tue, 11 Jan 2005 15:30:37 -0200


Aleksandar Dezelin wrote:
> 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.
> 

Hi Aleksandar,

I'm using Postgresql 8.0.0beta5.

User who reported me this problem is using Mono 1.0.4
I'm using Mono from svn.

On my tests I didn't change the encoding on server. The same sample 
prints correctly with LANG set and don't with no LANG.

User reported me back that on 1.0.4 it works only on linux with 
LANG=en_US but not with es_ES. I could confirm that svn worked with 
en_US and es_ES.

Is there some other thing I should try?

Thanks in advance.

Regards,

Francisco Figueiredo Jr.