class UTF8Decoder
Required header: <Eclog/UTF8Decoder.h>
The UTF8Decoder class represents a UTF-8 decoder.
Name | Description |
---|---|
(constructor) | Constructor. |
peekChar | Reads the next Unicode character from the input stream without extracting it. |
getChar | Extracts the next Unicode character from the input stream. |
position | Returns the position of the current character. |
explicit UTF8Decoder(InputStream& is);
Constructs a UTF8Decoder.
InputStream&
os The UTF-8 encoded stream to read from.
int peekChar();
int peekChar(ErrorCode& ec);
Reads the next Unicode character from the input stream without extracting it.
ErrorCode&
ec Set to indicate what error occurred, if any.
int
Unicode code point.
int getChar();
int getChar(ErrorCode& ec);
Extracts the next Unicode character from the input stream.
ErrorCode&
ec Set to indicate what error occurred, if any.
int
Unicode code point.
long long position() const;
Returns the position of the current character.
long long
The current position.