April 2, 2009
6:38 p.m.
2009/4/1 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
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