Public Types |
| enum | { DefaultReplacementChar = 0xfffd
} |
Public Member Functions |
| | TUniCodec () |
| | TUniCodec (TUnicodeErrorHandling errorHandling_, bool strict_, int replacementChar_, bool skipBom_) |
| template<typename TSrcVec , typename TDestCh > |
| size_t | DecodeUtf8 (const TSrcVec &src, size_t srcIdx, const size_t srcCount, TVec< TDestCh > &dest, const bool clrDest=true) const |
| template<typename TSrcVec , typename TDestCh > |
| size_t | DecodeUtf8 (const TSrcVec &src, TVec< TDestCh > &dest, const bool clrDest=true) const |
| template<typename TSrcVec , typename TDestCh > |
| size_t | EncodeUtf8 (const TSrcVec &src, size_t srcIdx, const size_t srcCount, TVec< TDestCh > &dest, const bool clrDest=true) const |
| template<typename TSrcVec , typename TDestCh > |
| size_t | EncodeUtf8 (const TSrcVec &src, TVec< TDestCh > &dest, const bool clrDest=true) const |
| template<typename TSrcVec > |
| TStr | EncodeUtf8Str (const TSrcVec &src, size_t srcIdx, const size_t srcCount) const |
| template<typename TSrcVec > |
| TStr | EncodeUtf8Str (const TSrcVec &src) const |
| template<typename TSrcVec , typename TDestCh > |
| size_t | DecodeUtf16FromBytes (const TSrcVec &src, size_t srcIdx, const size_t srcCount, TVec< TDestCh > &dest, const bool clrDest, const TUtf16BomHandling bomHandling=bomAllowed, const TUniByteOrder defaultByteOrder=boMachineEndian) const |
| template<typename TSrcVec , typename TDestCh > |
| size_t | DecodeUtf16FromWords (const TSrcVec &src, size_t srcIdx, const size_t srcCount, TVec< TDestCh > &dest, bool clrDest, const TUtf16BomHandling bomHandling=bomAllowed, const TUniByteOrder defaultByteOrder=boMachineEndian) const |
| template<typename TSrcVec , typename TDestCh > |
| size_t | EncodeUtf16ToWords (const TSrcVec &src, size_t srcIdx, const size_t srcCount, TVec< TDestCh > &dest, const bool clrDest, const bool insertBom, const TUniByteOrder destByteOrder=boMachineEndian) const |
| template<typename TSrcVec , typename TDestCh > |
| size_t | EncodeUtf16ToBytes (const TSrcVec &src, size_t srcIdx, const size_t srcCount, TVec< TDestCh > &dest, const bool clrDest, const bool insertBom, const TUniByteOrder destByteOrder=boMachineEndian) const |
| void | TestUtf8 () |
| void | TestUtf16 () |
Public Attributes |
| int | replacementChar |
| TUnicodeErrorHandling | errorHandling |
| bool | strict |
| bool | skipBom |
Protected Types |
| enum | {
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0),
DefineByte = (1, 0, 0, 0, 0, 0, 0, 0)
} |
| enum | { Utf16FirstSurrogate = 0xd800,
Utf16SecondSurrogate = 0xdc00
} |
| typedef TUniVecIdx | TVecIdx |
Protected Member Functions |
| void | TestUtf8 (bool decode, size_t expectedRetVal, bool expectedThrow, const TIntV &src, const TIntV &expectedDest, FILE *f) |
| void | TestDecodeUtf8 (TRnd &rnd, const TStr &testCaseDesc) |
| void | WordsToBytes (const TIntV &src, TIntV &dest) |
| void | TestUtf16 (bool decode, size_t expectedRetVal, bool expectedThrow, const TIntV &src, const TIntV &expectedDest, const TUtf16BomHandling bomHandling, const TUniByteOrder defaultByteOrder, const bool insertBom, FILE *f) |
| void | TestDecodeUtf16 (TRnd &rnd, const TStr &testCaseDesc, const TUtf16BomHandling bomHandling, const TUniByteOrder defaultByteOrder, const bool insertBom) |
Static Protected Member Functions |
| static bool | IsMachineLittleEndian () |
| static uint | GetRndUint (TRnd &rnd) |
| static uint | GetRndUint (TRnd &rnd, uint minVal, uint maxVal) |
| static int | SwapBytes (int x) |
Friends |
| class | TUniCaseFolding |