> Another "hard to quote" message, but I hope my answer will be clear.
> The "problem" is that in Pharo the leadingChar for unicode characters is 
> still 255. This was changed in Squeak 4.1 to 0. So in Squeak 4.1:
> (Unicode value: 8230) codePoint. "===> 8230"
> 
> While in Pharo it's:
> (Unicode value: 8230) codePoint. "===> 1069555750"
> (Character value: 1069555750) charCode. "===> 8230"
> (Character value: 1069555750) leadingChar. "===> 255"
> 
> So using #charCode instead of #codePoint is the solution.

Thanks levente.
In Pharo 1.1 we get the same as in squeak.
> (Unicode value: 8230) codePoint. "===> 1069555750"
> (Character value: 1069555750) charCode. "===> 8230"
> (Character value: 1069555750) leadingChar. "===> 255"



0 locale encoded by 0 is Unicode

initialize

        self allSubclassesDo: [:each | each initialize].

        EncodedCharSets := Array new: 256.

        EncodedCharSets at: 0+1 put: Unicode "Latin1Environment".
        EncodedCharSets at: 1+1 put: JISX0208.
        EncodedCharSets at: 2+1 put: GB2312.
        EncodedCharSets at: 3+1 put: KSX1001.
        EncodedCharSets at: 4+1 put: JISX0208.
        EncodedCharSets at: 5+1 put: JapaneseEnvironment.
        EncodedCharSets at: 6+1 put: SimplifiedChineseEnvironment.
        EncodedCharSets at: 7+1 put: KoreanEnvironment.
        EncodedCharSets at: 8+1 put: GB2312.
        "EncodedCharSets at: 9+1 put: UnicodeTraditionalChinese."
        "EncodedCharSets at: 10+1 put: UnicodeVietnamese."
        EncodedCharSets at: 12+1 put: KSX1001.
        EncodedCharSets at: 13+1 put: GreekEnvironment.
        EncodedCharSets at: 14+1 put: Latin2Environment.
        EncodedCharSets at: 15+1 put: RussianEnvironment.
        EncodedCharSets at: 16+1 put: NepaleseEnvironment.
        EncodedCharSets at: 256 put: Unicode.

> 

Now I was wondering why in squeak and pharo 
        (Character value: 1069555750) leadingChar. "===> 255"

stef




_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to