class CnvUtilities |
Provides static character conversion utilities for complex encodings. Its functions may be called from a plug-in DLL's implementation of ConvertFromUnicode() and ConvertToUnicode().
These utility functions are provided for use when converting to/from complex character set encodings, including modal encodings. Modal encodings are those where the interpretation of a given byte of data is dependent on the current mode; mode changing is performed by escape sequences which occur in the byte stream. A non-modal complex encoding is one in which characters are encoded using variable numbers of bytes. The number of bytes used to encode a character depends on the value of the initial byte.
Private Member Functions | |
---|---|
void | CheckArrayOfCharacterSets(const TArray< SCharacterSet > &) |
void | CheckArrayOfMethods(const TArray< SMethod > &) |
void | CheckArrayOfStates(const TArray< SState > &) |
TBool | IsStartOf(const TDesC8 &, const TDesC8 &) |
TInt | LengthOfUnicodeCharacter(const TDesC16 &, TInt) |
TBool | MatchesEscapeSequence(TInt &, TPtrC8 &, TPtrC8 &, const TDesC8 &) |
TBool | NextHomogeneousForeignRun(const SCnvConversionData *&, TInt &, TPtrC8 &, TPtrC8 &, const TArray< SState > &, TUint &) |
TInt | ReduceToNearestMultipleOf(TInt, TInt) |
Public Member Type Definitions | |
---|---|
typedef | void(* FConvertFromIntermediateBufferInPlace |
typedef | void(* FConvertToIntermediateBufferInPlace |
typedef | TInt(* FNumberOfBytesAbleToConvert |
void | CheckArrayOfCharacterSets | ( | const TArray< SCharacterSet > & | aArrayOfCharacterSets | ) | [private, static] |
const TArray< SCharacterSet > & aArrayOfCharacterSets |
void | CheckArrayOfMethods | ( | const TArray< SMethod > & | aArrayOfMethods | ) | [private, static] |
void | CheckArrayOfStates | ( | const TArray< SState > & | aArrayOfStates | ) | [private, static] |
IMPORT_C void | ConvertFromIntermediateBufferInPlace | ( | TInt | aStartPositionInDescriptor, |
TDes8 & | aDescriptor, | |||
TInt & | aNumberOfCharactersThatDroppedOut, | |||
const TDesC8 & | aEscapeSequence, | |||
TInt | aNumberOfBytesPerCharacter | |||
) | [static] |
IMPORT_C TInt | ConvertFromUnicode | ( | CCnvCharacterSetConverter::TEndianness | aDefaultEndiannessOfForeignCharacters, |
const TDesC8 & | aReplacementForUnconvertibleUnicodeCharacters, | |||
TDes8 & | aForeign, | |||
const TDesC16 & | aUnicode, | |||
CCnvCharacterSetConverter::TArrayOfAscendingIndices & | aIndicesOfUnconvertibleCharacters, | |||
const TArray< SCharacterSet > & | aArrayOfCharacterSets | |||
) | [static] |
CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters | |
const TDesC8 & aReplacementForUnconvertibleUnicodeCharacters | |
TDes8 & aForeign | |
const TDesC16 & aUnicode | |
CCnvCharacterSetConverter::TArrayOfAscendingIndices & aIndicesOfUnconvertibleCharacters | |
const TArray< SCharacterSet > & aArrayOfCharacterSets |
IMPORT_C TInt | ConvertFromUnicode | ( | CCnvCharacterSetConverter::TEndianness | aDefaultEndiannessOfForeignCharacters, |
const TDesC8 & | aReplacementForUnconvertibleUnicodeCharacters, | |||
TDes8 & | aForeign, | |||
const TDesC16 & | aUnicode, | |||
CCnvCharacterSetConverter::TArrayOfAscendingIndices & | aIndicesOfUnconvertibleCharacters, | |||
const TArray< SCharacterSet > & | aArrayOfCharacterSets, | |||
TUint & | aOutputConversionFlags, | |||
TUint | aInputConversionFlags | |||
) | [static] |
CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters | |
const TDesC8 & aReplacementForUnconvertibleUnicodeCharacters | |
TDes8 & aForeign | |
const TDesC16 & aUnicode | |
CCnvCharacterSetConverter::TArrayOfAscendingIndices & aIndicesOfUnconvertibleCharacters | |
const TArray< SCharacterSet > & aArrayOfCharacterSets | |
TUint & aOutputConversionFlags | |
TUint aInputConversionFlags |
IMPORT_C TInt | ConvertToUnicodeFromHeterogeneousForeign | ( | CCnvCharacterSetConverter::TEndianness | aDefaultEndiannessOfForeignCharacters, |
TDes16 & | aUnicode, | |||
const TDesC8 & | aForeign, | |||
TInt & | aNumberOfUnconvertibleCharacters, | |||
TInt & | aIndexOfFirstByteOfFirstUnconvertibleCharacter, | |||
const TArray< SMethod > & | aArrayOfMethods | |||
) | [static] |
IMPORT_C TInt | ConvertToUnicodeFromHeterogeneousForeign | ( | CCnvCharacterSetConverter::TEndianness | aDefaultEndiannessOfForeignCharacters, |
TDes16 & | aUnicode, | |||
const TDesC8 & | aForeign, | |||
TInt & | aNumberOfUnconvertibleCharacters, | |||
TInt & | aIndexOfFirstByteOfFirstUnconvertibleCharacter, | |||
const TArray< SMethod > & | aArrayOfMethods, | |||
TUint & | aOutputConversionFlags, | |||
TUint | aInputConversionFlags | |||
) | [static] |
CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters | |
TDes16 & aUnicode | |
const TDesC8 & aForeign | |
TInt & aNumberOfUnconvertibleCharacters | |
TInt & aIndexOfFirstByteOfFirstUnconvertibleCharacter | |
const TArray< SMethod > & aArrayOfMethods | |
TUint & aOutputConversionFlags | |
TUint aInputConversionFlags |
IMPORT_C TInt | ConvertToUnicodeFromModalForeign | ( | CCnvCharacterSetConverter::TEndianness | aDefaultEndiannessOfForeignCharacters, |
TDes16 & | aUnicode, | |||
const TDesC8 & | aForeign, | |||
TInt & | aState, | |||
TInt & | aNumberOfUnconvertibleCharacters, | |||
TInt & | aIndexOfFirstByteOfFirstUnconvertibleCharacter, | |||
const TArray< SState > & | aArrayOfStates | |||
) | [static] |
IMPORT_C TInt | ConvertToUnicodeFromModalForeign | ( | CCnvCharacterSetConverter::TEndianness | aDefaultEndiannessOfForeignCharacters, |
TDes16 & | aUnicode, | |||
const TDesC8 & | aForeign, | |||
TInt & | aState, | |||
TInt & | aNumberOfUnconvertibleCharacters, | |||
TInt & | aIndexOfFirstByteOfFirstUnconvertibleCharacter, | |||
const TArray< SState > & | aArrayOfStates, | |||
TUint & | aOutputConversionFlags, | |||
TUint | aInputConversionFlags | |||
) | [static] |
CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters | |
TDes16 & aUnicode | |
const TDesC8 & aForeign | |
TInt & aState | |
TInt & aNumberOfUnconvertibleCharacters | |
TInt & aIndexOfFirstByteOfFirstUnconvertibleCharacter | |
const TArray< SState > & aArrayOfStates | |
TUint & aOutputConversionFlags | |
TUint aInputConversionFlags |
TBool | IsStartOf | ( | const TDesC8 & | aStart, |
const TDesC8 & | aPotentiallyLongerDescriptor | |||
) | [private, static] |
TInt | LengthOfUnicodeCharacter | ( | const TDesC16 & | aUnicode, |
TInt | aIndex | |||
) | [private, static] |
TBool | MatchesEscapeSequence | ( | TInt & | aNumberOfForeignBytesConsumed, |
TPtrC8 & | aHomogeneousRun, | |||
TPtrC8 & | aRemainderOfForeign, | |||
const TDesC8 & | aEscapeSequence | |||
) | [private, static] |
TBool | NextHomogeneousForeignRun | ( | const SCnvConversionData *& | aConversionData, |
TInt & | aNumberOfForeignBytesConsumed, | |||
TPtrC8 & | aHomogeneousRun, | |||
TPtrC8 & | aRemainderOfForeign, | |||
const TArray< SState > & | aArrayOfStates, | |||
TUint & | aOutputConversionFlags | |||
) | [private, static] |
TInt | ReduceToNearestMultipleOf | ( | TInt | aNumber1, |
TInt | aNumber2 | |||
) | [private, static, inline] |
typedef void(* | FConvertFromIntermediateBufferInPlace |
A pointer to a function which "mangles" text when converting from Unicode into a complex modal or non-modal foreign character set encoding.
It might insert a shifting character, escape sequence, or other special characters.If the target character set encoding is modal, the implementation of this function may call the CnvUtilities::ConvertFromIntermediateBufferInPlace() utility function which is provided because many modal character sets require an identical implementation of this function.
" convutils.lib "
typedef void(* | FConvertToIntermediateBufferInPlace |
A pointer to a function which prepares the text for conversion into Unicode.
For instance it might remove any shifting or other special characters. Called when converting from a non-modal complex character set encoding into Unicode.
" convutils.lib "
typedef TInt(* | FNumberOfBytesAbleToConvert |
A pointer to a function which calculates the number of consecutive bytes in the remainder of the foreign descriptor which can be converted using the current character set's conversion data.
Called when converting from a non-modal complex character set encoding into Unicode. It may return a negative CCnvCharacterSetConverter::TError value to indicate an error in the encoding.
" convutils.lib "