eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'CharacterEncoder::CompoundEncoder':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: CompoundEncoder (private in CharacterEncoder

This class is only visible from within CharacterEncoder.

Inheritance:

   Object
   |
   +--CharacterEncoder
      |
      +--CharacterEncoder::CompoundEncoder

Package:
stx:libbasic
Category:
Collections-Text-Encodings
Owner:
CharacterEncoder

Description:


A compoundEncoder uses two real encoders;
to encode:
    string -> decoder(encode) -> encoder -> result
to decode:
    string -> encoder -> decoder -> result

|e|

e := CompoundEncoder new.
e encoder:ISO8859_5 decoder:KOI8_R.
e decode:16rB0.  'CYRILLIC CAPITAL LETTER A; 16rB0 in 8859-5; 16rE1 in KOI8-R'.
e encode:16rE1.  


Instance protocol:

accessing
o  encoder: encoderArg decoder: decoderArg
set instance variables (automatically generated)

encoding & decoding
o  decodeString: anEncodedStringOrByteCollection
Modified (format): / 17-01-2018 / 13:44:08 / stefan

o  encodeString: anEncodedStringOrByteCollection
Modified (format): / 17-01-2018 / 13:46:26 / stefan

printing
o  printOn: aStream
nextPutAll:(decoder nameOfDecodedCode);

queries
o  characterSize: aCharacterOrCodepoint
return the number of bytes required to encode aCharacterOrCodepoint

stream support
o  readNext: count charactersFrom: aStream

o  readNextCharacterFrom: aStream



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:35:46 GMT