The m17n Squeak supports a number of text file formats. The
extends the feature of
,
and has capability to switch the file format it reads and writes.
has a instance variable called
``
.'' The family of methods for writing characters and
strings eventually calls
of
and that method delegates the request to the converter's
method. Similarly, the kernel of reading
characters is the
method and this method delegates the request
to the converter's
method.
Conceptually, all the converter object has to implement is those two
methods. However, for proper
implementation, the stream
has to be able to push back ``a character'' regardless the its actual
size in the file.
of the converter returns the
octet size for the last character read.
Currently, X Compound Text, GB2312, EUC-jp, EUC-kr, Shift-JIS, UTF-8
are supported.