Encoding issue with french characters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Encoding issue with french characters

Nicolas Petton
Hi,

I think there is an encoding issue with french characters (every
non-ascii character?):

st> 'é' first == 'à' first
true

st> 'é' first value == 'à' first value
true

Cheers!

Nico




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Encoding issue with french characters

Paolo Bonzini-2
On 02/26/2010 08:24 PM, Nicolas Petton wrote:

> Hi,
>
> I think there is an encoding issue with french characters (every
> non-ascii character?):
>
> st>  'é' first == 'à' first
> true
>
> st>  'é' first value == 'à' first value
> true

In UTF-8 they start the same:

st> 'é' asByteArray
ByteArray (195 169 )

st> 'à' asByteArray
ByteArray (195 160 )

With the Iconv package loaded,

st> 'é' first == 'à' first
true

st> 'é' encoding
'UTF-8'

st> ('é' asString: 'UTF-8') first == ('à' asString: 'UTF-8') first
true

but...

st> 'é' asUnicodeString first == 'à' asUnicodeString first
false

st> ('é' asString: 'ISO-8859-1') first ==
st>    ('à' asString: 'ISO-8859-1') first
false

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk