2009/4/1 Nicolas Cellier <[email protected]>:
> Hello list,
>
> that's just a detail, but I do not much like Character>>unicodeToMacRoman.
>
> Why?
> Because a Character does not explicitely carry encoding information.
> On the contrary, Character are implicitely considered as unicode
> encoded in 99% of code.
>
> So, pretending a Character can change encoding is just a hack for a
> small portion of code...

Err...
For some leadingChar ~= 0, encoding IS NOT unicode.
Encoding is specified by leadingChar.

x := (1 << 22 + 16rE4) asCharacter.
x asUnicode hex.  -> 'FF29'
x charCode hex.  -> 'E4'
EncodedCharSet charsetAt: x leadingChar. -> JISX0208

Beware not to print such a Character, it might fail with never ending
notifier poping up

Nicolas

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to