Poco

class UTF32Encoding

File Information

Library: Foundation
Package: Text
Header: Poco/UTF32Encoding.h

Description

UTF-32 text encoding, as defined in RFC 2781.

When converting from UTF-32 to Unicode, surrogates are reported as they are - in other words, surrogate pairs are not combined into one Unicode character.

Inheritance

Direct Base Classes: TextEncoding

All Base Classes: TextEncoding

Member Summary

Member Functions: canonicalName, characterMap, convert, getByteOrder, isA, queryConvert, safeToInt, sequenceLength, setByteOrder

Inherited Functions: add, byName, canonicalName, characterMap, convert, find, global, isA, manager, queryConvert, remove, sequenceLength

Enumerations

ByteOrderType

BIG_ENDIAN_BYTE_ORDER

LITTLE_ENDIAN_BYTE_ORDER

NATIVE_BYTE_ORDER

Constructors

UTF32Encoding

UTF32Encoding(
    ByteOrderType byteOrder = NATIVE_BYTE_ORDER
);

Creates and initializes the encoding for the given byte order.

UTF32Encoding

UTF32Encoding(
    int byteOrderMark
);

Creates and initializes the encoding for the byte-order indicated by the given byte-order mark, which is the Unicode character 0xFEFF.

Destructor

~UTF32Encoding virtual

~UTF32Encoding();

Member Functions

canonicalName virtual

const char * canonicalName() const;

characterMap virtual

const CharacterMap & characterMap() const;

convert virtual

int convert(
    const unsigned char * bytes
) const;

convert virtual

int convert(
    int ch,
    unsigned char * bytes,
    int length
) const;

getByteOrder

ByteOrderType getByteOrder() const;

Returns the byte-order currently in use.

isA virtual

bool isA(
    const std::string & encodingName
) const;

queryConvert virtual

int queryConvert(
    const unsigned char * bytes,
    int length
) const;

sequenceLength virtual

int sequenceLength(
    const unsigned char * bytes,
    int length
) const;

setByteOrder

void setByteOrder(
    ByteOrderType byteOrder
);

Sets the byte order.

setByteOrder

void setByteOrder(
    int byteOrderMark
);

Sets the byte order according to the given byte order mark, which is the Unicode character 0xFEFF.

safeToInt protected static inline

static int safeToInt(
    Poco::UInt32 value
);