[squeak-dev] how to create an UTF-8 character

Norbert Hartl norbert at hartl.name
Sat Sep 27 10:46:48 UTC 2008


On Sat, 2008-09-27 at 08:18 +0200, stephane ducasse wrote:
> >>
> > Am I the only one using the generic en/decoding functionality in
> > Squeak in the form of #convertTo/FromEncoding?
> >
> > Convert from "Squeak" to UTF-8
> > aString convertToEncoding: 'utf-8'
> 
> 
> do I understand correctly that such a aString is a sequence of unicode  
> codepoints?
> >
At first the utf-8 is a sequence of bytes. These bytes are a space
optimzed encoding of a code point (utf-8). If you decode those bytes 
you get your code point (unicode). From a sequence of code points
you can derive a character. In most cases (for us westerners) it will
be a single code point AFAIK.

Norbert
> >
> > Convert from UTF-8 to "Squeak"
> > aString converFromEncoding: 'utf-8'
> >
> > For checking out all the encodings your image supports:
> > TextConverter allEncodingNames
> >
> > Cheers
> > Philippe
> >
> 
> 




More information about the Squeak-dev mailing list