![]() |
Smalltalk/X WebserverDocumentation of class 'CharacterEncoderImplementations::ISO10646_to_UTF8': |
|
|
Class: ISO10646_to_UTF8 (in CharacterEncoderImplementations)Inheritance:Object | +--CharacterEncoder | +--CharacterEncoderImplementations::VariableBytesEncoder | +--CharacterEncoderImplementations::ISO10646_to_UTF8 | +--CharacterEncoderImplementations::ISO10646_to_UTF8_MAC | +--CharacterEncoderImplementations::ISO10646_to_XMLUTF8
Description:I can encode unicode characters into utf-8 and decode utf-8 characters into unicode. Notice the naming (many are confused): Unicode is the set of number-to-glyph assignments whereas: UTF8 is a concrete way of xmitting Unicode codePoints (numbers). UTF16 is another concrete encoding, for example. ST/X NEVER uses UTF8 internally - all characters are full 24bit characters. Only when exchanging data, are these converted into UTF8 (or other) byte sequences. Class protocol:instance creation
Instance protocol:encoding & decoding
Examples:Encoding (unicode to utf8) ISO10646_to_UTF8 encodeString:'hello'. Decoding (utf8 to unicode): |t| t := ISO10646_to_UTF8 encodeString:'Hello'. ISO10646_to_UTF8 decodeString:t. |
|
|
ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Mon, 04 Dec 2023 10:08:01 GMT
|