Hi,
ZnCharacterEncoder and its subclasses in the package Zinc-Character-Encoding-Core (a standard part of Pharo) have the following features:
- proper Unicode Character/String to/from byte(s) encoding/decoding
- calculation of encoding size per Character/String
- proper handling of holes in tables with exceptions (strict/lenient)
- properly backing up one character on a binary stream
- simple, efficient, documented
- convenience API
- optimisations for some encodings
Together, they support the following encodings:
- utf-8
- utf-16 (big/little endian, bom detection)
- null
- iso-8859-1 (latin-1)
- iso-8859-2 (latin-2)
- mac-roman
- cp1250
- cp1252
- cp1253
- koi8r
- iso-8859-7
- iso-8859-15
The question is, what other encodings do you want/need ?
There is already a request to add CP1251.
New byte encoders are easy to add, based on the official Unicode mappings that can be found here: http://unicode.org/Public/MAPPINGS (these are automagically parsed).
Please help us make Pharo more international friendly.
Sven