CCnvCharacterSetConverter Class Reference

class CCnvCharacterSetConverter : public CBase

Converts text between Unicode and other character sets.

The first stage of the conversion is to specify the non-Unicode character set being converted to or from. This is done by calling one of the overloads of PrepareToConvertToOrFromL().

The second stage is to convert the text, using one of the overloads of ConvertFromUnicode() or ConvertToUnicode().

Where possible the first documented overload of PrepareToConvertToOrFromL() should be used because the second overload panics if the specified character set is not available: the first overload simply returns whether the character set is available or not available. However if the conversions are to be performed often, or if the user must select the character set for the conversion from a list, the second overload may be more appropriate.

The first overload is less efficient than the second, because it searches through the file system for the selected character set every time it is invoked. The second overload searches through an array of all available character sets. In this method, the file system need only be searched once - when CreateArrayOfCharacterSetsAvailableLC() or CreateArrayOfCharacterSetsAvailableL() is used to create the array.

The conversion functions allow users of this class to perform partial conversions on an input descriptor, handling the situation where the input descriptor is truncated mid way through a multi-byte character. This means that you do not have to guess how big to make the output descriptor for a given input descriptor, you can simply do the conversion in a loop using a small output descriptor. The ability to handle truncated descriptors also allows users of the class to convert information received in chunks from an external source.

The class also provides a number of utility functions.

Inherits from

  • CCnvCharacterSetConverter
Public Member Functions
~CCnvCharacterSetConverter()
IMPORT_C const SCnvConversionData &AsciiConversionData()
IMPORT_C voidAutoDetectCharSetL(TInt &, TUint &, const CArrayFix< SCharacterSet > &, const TDesC8 &)
IMPORT_C voidAutoDetectCharacterSetL(TInt &, TUint &, const CArrayFix< SCharacterSet > &, const TDesC8 &)
IMPORT_C TIntConvertCharacterSetIdentifierToMibEnumL(TUint, RFs &)
IMPORT_C HBufC8 *ConvertCharacterSetIdentifierToStandardNameL(TUint, RFs &)
IMPORT_C TIntConvertFromUnicode(TDes8 &, const TDesC16 &)
IMPORT_C TIntConvertFromUnicode(TDes8 &, const TDesC16 &, TInt &)
IMPORT_C TIntConvertFromUnicode(TDes8 &, const TDesC16 &, TInt &, TInt &)
IMPORT_C TIntConvertFromUnicode(TDes8 &, const TDesC16 &, TArrayOfAscendingIndices &)
IMPORT_C TUintConvertMibEnumOfCharacterSetToIdentifierL(TInt, RFs &)
IMPORT_C TUintConvertStandardNameOfCharacterSetToIdentifierL(const TDesC8 &, RFs &)
IMPORT_C TIntConvertToUnicode(TDes16 &, const TDesC8 &, TInt &)
IMPORT_C TIntConvertToUnicode(TDes16 &, const TDesC8 &, TInt &, TInt &)
IMPORT_C TIntConvertToUnicode(TDes16 &, const TDesC8 &, TInt &, TInt &, TInt &)
IMPORT_C voidConvertibleToCharSetL(TInt &, const TUint, const CArrayFix< SCharacterSet > &, const TDesC8 &)
IMPORT_C voidConvertibleToCharacterSetL(TInt &, const TUint, const CArrayFix< SCharacterSet > &, const TDesC8 &)
IMPORT_C CArrayFix< SCharacterSet > *CreateArrayOfCharacterSetsAvailableL(RFs &)
IMPORT_C CArrayFix< SCharacterSet > *CreateArrayOfCharacterSetsAvailableLC(RFs &)
IMPORT_C TIntDoConvertFromUnicode(const SCnvConversionData &, TEndianness, const TDesC8 &, TDes8 &, const TDesC16 &, TArrayOfAscendingIndices &)
IMPORT_C TIntDoConvertFromUnicode(const SCnvConversionData &, TEndianness, const TDesC8 &, TDes8 &, const TDesC16 &, TArrayOfAscendingIndices &, TUint &, TUint)
IMPORT_C TIntDoConvertToUnicode(const SCnvConversionData &, TEndianness, TDes16 &, const TDesC8 &, TInt &, TInt &)
IMPORT_C TIntDoConvertToUnicode(const SCnvConversionData &, TEndianness, TDes16 &, const TDesC8 &, TInt &, TInt &, TUint &, TUint)
TDowngradeForExoticLineTerminatingCharacters GetDowngradeForExoticLineTerminatingCharacters()
IMPORT_C CCnvCharacterSetConverter *NewL()
IMPORT_C CCnvCharacterSetConverter *NewLC()
IMPORT_C voidPrepareToConvertToOrFromL(TUint, const CArrayFix< SCharacterSet > &, RFs &)
IMPORT_C TAvailabilityPrepareToConvertToOrFromL(TUint, RFs &)
IMPORT_C voidSetDefaultEndiannessOfForeignCharacters(TEndianness)
IMPORT_C voidSetDowngradeForExoticLineTerminatingCharacters(TDowngradeForExoticLineTerminatingCharacters)
IMPORT_C voidSetMaxCacheSize(TInt)
IMPORT_C voidSetReplacementForUnconvertibleUnicodeCharactersL(const TDesC8 &)
Private Member Functions
CCnvCharacterSetConverter()
TCharacterSetSearch AppendHardCodedCharacterSetIfRequiredL(CArrayFix< SCharacterSet > &, TUint, TUint, const TDesC &)
voidConstructL()
voidDeleteConversionData(const SCnvConversionData *)
voidDeleteConversionData(TAny *)
CArrayFix< SCharacterSet > *DoCreateArrayOfCharacterSetsAvailableLC(RFs &, TUint)
TAvailability DoPrepareToConvertToOrFromL(TUint, const CArrayFix< SCharacterSet > *, RFs &)
TEndianness EndiannessOfForeignCharacters(const SCnvConversionData &, TEndianness)
voidScanForStandardNamesAndMibEnumsL(RFs &)
voidScanForStandardNamesAndMibEnumsROMOnlyL(RFs &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumanonymous { EInputConversionFlagAppend = 0x00010000, EInputConversionFlagAllowTruncatedInputNotEvenPartlyConsumable = 0x00020000, EInputConversionFlagStopAtFirstUnconvertibleCharacter = 0x00040000, EInputConversionFlagMustEndInDefaultCharacterSet = 0x00080000, EInputConversionFlagAssumeStartInDefaultCharacterSet = 0x00100000 }
enumanonymous { EOutputConversionFlagInputIsTruncated = 0x01000000 }
enumanonymous { ELowestThreshold = 25 }
enumTAvailability { EAvailable, ENotAvailable }
enumTDowngradeForExoticLineTerminatingCharacters { EDowngradeExoticLineTerminatingCharactersToCarriageReturnLineFeed, EDowngradeExoticLineTerminatingCharactersToJustLineFeed }
enumTEndianness { ELittleEndian, EBigEndian }
enumTError { EErrorIllFormedInput = KErrCorrupt }
Private Member Enumerations
enumanonymous { EStoredFlagOwnsConversionData = 0x00000001, EStoredFlagConversionPlugInLibraryIsLoaded = 0x00000002 }
enumTCharacterSetSearch { EStopCharacterSetSearch, EContinueCharacterSetSearch }
enumTConversionPlugInFunctionOrdinals { EReplacementForUnconvertibleUnicodeCharacters = 1, EConvertFromUnicode = 2, EConvertToUnicode = 3, EIsInThisCharacterSet = 4 }
Private Attributes
TUint iCharacterSetIdentifierOfLoadedConversionData
CCharsetCnvCache *iCharsetCnvCache
const SCnvConversionData *iConversionData
TEndianness iDefaultEndiannessOfForeignCharacters
TDowngradeForExoticLineTerminatingCharacters iDowngradeForExoticLineTerminatingCharacters
TBool iIsSystemStandardNamesAndMibEnumsScanned
TBuf8< KMaximumLengthOfReplacementForUnconvertibleUnicodeCharacters >iReplacementForUnconvertibleUnicodeCharacters
CStandardNamesAndMibEnums *iStandardNamesAndMibEnums
TUint iStoredFlags
TBool iTlsDataConstructed

Constructor & Destructor Documentation

CCnvCharacterSetConverter()

CCnvCharacterSetConverter()[private]

~CCnvCharacterSetConverter()

IMPORT_C~CCnvCharacterSetConverter()[virtual]

Member Functions Documentation

AppendHardCodedCharacterSetIfRequiredL(CArrayFix< SCharacterSet > &, TUint, TUint, const TDesC &)

TCharacterSetSearch AppendHardCodedCharacterSetIfRequiredL(CArrayFix< SCharacterSet > &aArrayOfCharacterSets,
TUintaIdentifierOfOnlyCharacterSetOfInterest,
TUintaIdentifierOfHardCodedCharacterSet,
const TDesC &aNameOfHardCodedCharacterSet
)[private, static]

Parameters

CArrayFix< SCharacterSet > & aArrayOfCharacterSets
TUint aIdentifierOfOnlyCharacterSetOfInterest
TUint aIdentifierOfHardCodedCharacterSet
const TDesC & aNameOfHardCodedCharacterSet

AsciiConversionData()

IMPORT_C const SCnvConversionData &AsciiConversionData()[static]

AutoDetectCharSetL(TInt &, TUint &, const CArrayFix< SCharacterSet > &, const TDesC8 &)

IMPORT_C voidAutoDetectCharSetL(TInt &aConfidenceLevel,
TUint &aCharacterSetIdentifier,
const CArrayFix< SCharacterSet > &aArrayOfCharacterSetsAvailable,
const TDesC8 &aSample
)

Parameters

TInt & aConfidenceLevel
TUint & aCharacterSetIdentifier
const CArrayFix< SCharacterSet > & aArrayOfCharacterSetsAvailable
const TDesC8 & aSample

AutoDetectCharacterSetL(TInt &, TUint &, const CArrayFix< SCharacterSet > &, const TDesC8 &)

IMPORT_C voidAutoDetectCharacterSetL(TInt &aConfidenceLevel,
TUint &aCharacterSetIdentifier,
const CArrayFix< SCharacterSet > &aArrayOfCharacterSetsAvailable,
const TDesC8 &aSample
)[static]

Parameters

TInt & aConfidenceLevel
TUint & aCharacterSetIdentifier
const CArrayFix< SCharacterSet > & aArrayOfCharacterSetsAvailable
const TDesC8 & aSample

ConstructL()

voidConstructL()[private]

ConvertCharacterSetIdentifierToMibEnumL(TUint, RFs &)

IMPORT_C TIntConvertCharacterSetIdentifierToMibEnumL(TUintaCharacterSetIdentifier,
RFs &aFileServerSession
)

Parameters

TUint aCharacterSetIdentifier
RFs & aFileServerSession

ConvertCharacterSetIdentifierToStandardNameL(TUint, RFs &)

IMPORT_C HBufC8 *ConvertCharacterSetIdentifierToStandardNameL(TUintaCharacterSetIdentifier,
RFs &aFileServerSession
)

Parameters

TUint aCharacterSetIdentifier
RFs & aFileServerSession

ConvertFromUnicode(TDes8 &, const TDesC16 &)

IMPORT_C TIntConvertFromUnicode(TDes8 &aForeign,
const TDesC16 &aUnicode
)const

Parameters

TDes8 & aForeign
const TDesC16 & aUnicode

ConvertFromUnicode(TDes8 &, const TDesC16 &, TInt &)

IMPORT_C TIntConvertFromUnicode(TDes8 &aForeign,
const TDesC16 &aUnicode,
TInt &aNumberOfUnconvertibleCharacters
)const

Parameters

TDes8 & aForeign
const TDesC16 & aUnicode
TInt & aNumberOfUnconvertibleCharacters

ConvertFromUnicode(TDes8 &, const TDesC16 &, TInt &, TInt &)

IMPORT_C TIntConvertFromUnicode(TDes8 &aForeign,
const TDesC16 &aUnicode,
TInt &aNumberOfUnconvertibleCharacters,
TInt &aIndexOfFirstUnconvertibleCharacter
)const

Parameters

TDes8 & aForeign
const TDesC16 & aUnicode
TInt & aNumberOfUnconvertibleCharacters
TInt & aIndexOfFirstUnconvertibleCharacter

ConvertFromUnicode(TDes8 &, const TDesC16 &, TArrayOfAscendingIndices &)

IMPORT_C TIntConvertFromUnicode(TDes8 &aForeign,
const TDesC16 &aUnicode,
TArrayOfAscendingIndices &aIndicesOfUnconvertibleCharacters
)const

Parameters

TDes8 & aForeign
const TDesC16 & aUnicode
TArrayOfAscendingIndices & aIndicesOfUnconvertibleCharacters

ConvertMibEnumOfCharacterSetToIdentifierL(TInt, RFs &)

IMPORT_C TUintConvertMibEnumOfCharacterSetToIdentifierL(TIntaMibEnumOfCharacterSet,
RFs &aFileServerSession
)

Parameters

TInt aMibEnumOfCharacterSet
RFs & aFileServerSession

ConvertStandardNameOfCharacterSetToIdentifierL(const TDesC8 &, RFs &)

IMPORT_C TUintConvertStandardNameOfCharacterSetToIdentifierL(const TDesC8 &aStandardNameOfCharacterSet,
RFs &aFileServerSession
)

Parameters

const TDesC8 & aStandardNameOfCharacterSet
RFs & aFileServerSession

ConvertToUnicode(TDes16 &, const TDesC8 &, TInt &)

IMPORT_C TIntConvertToUnicode(TDes16 &aUnicode,
const TDesC8 &aForeign,
TInt &aState
)const

Parameters

TDes16 & aUnicode
const TDesC8 & aForeign
TInt & aState

ConvertToUnicode(TDes16 &, const TDesC8 &, TInt &, TInt &)

IMPORT_C TIntConvertToUnicode(TDes16 &aUnicode,
const TDesC8 &aForeign,
TInt &aState,
TInt &aNumberOfUnconvertibleCharacters
)const

Parameters

TDes16 & aUnicode
const TDesC8 & aForeign
TInt & aState
TInt & aNumberOfUnconvertibleCharacters

ConvertToUnicode(TDes16 &, const TDesC8 &, TInt &, TInt &, TInt &)

IMPORT_C TIntConvertToUnicode(TDes16 &aUnicode,
const TDesC8 &aForeign,
TInt &aState,
TInt &aNumberOfUnconvertibleCharacters,
TInt &aIndexOfFirstByteOfFirstUnconvertibleCharacter
)const

Parameters

TDes16 & aUnicode
const TDesC8 & aForeign
TInt & aState
TInt & aNumberOfUnconvertibleCharacters
TInt & aIndexOfFirstByteOfFirstUnconvertibleCharacter

ConvertibleToCharSetL(TInt &, const TUint, const CArrayFix< SCharacterSet > &, const TDesC8 &)

IMPORT_C voidConvertibleToCharSetL(TInt &aConfidenceLevel,
const TUintaCharacterSetIdentifier,
const CArrayFix< SCharacterSet > &aArrayOfCharacterSetsAvailable,
const TDesC8 &aSample
)

Parameters

TInt & aConfidenceLevel
const TUint aCharacterSetIdentifier
const CArrayFix< SCharacterSet > & aArrayOfCharacterSetsAvailable
const TDesC8 & aSample

ConvertibleToCharacterSetL(TInt &, const TUint, const CArrayFix< SCharacterSet > &, const TDesC8 &)

IMPORT_C voidConvertibleToCharacterSetL(TInt &aConfidenceLevel,
const TUintaCharacterSetIdentifier,
const CArrayFix< SCharacterSet > &aArrayOfCharacterSetsAvailable,
const TDesC8 &aSample
)[static]

Parameters

TInt & aConfidenceLevel
const TUint aCharacterSetIdentifier
const CArrayFix< SCharacterSet > & aArrayOfCharacterSetsAvailable
const TDesC8 & aSample

CreateArrayOfCharacterSetsAvailableL(RFs &)

IMPORT_C CArrayFix< SCharacterSet > *CreateArrayOfCharacterSetsAvailableL(RFs &aFileServerSession)[static]

Parameters

RFs & aFileServerSession

CreateArrayOfCharacterSetsAvailableLC(RFs &)

IMPORT_C CArrayFix< SCharacterSet > *CreateArrayOfCharacterSetsAvailableLC(RFs &aFileServerSession)[static]

Parameters

RFs & aFileServerSession

DeleteConversionData(const SCnvConversionData *)

voidDeleteConversionData(const SCnvConversionData *aConversionData)[private, static]

Parameters

const SCnvConversionData * aConversionData

DeleteConversionData(TAny *)

voidDeleteConversionData(TAny *aConversionData)[private, static]

Parameters

TAny * aConversionData

DoConvertFromUnicode(const SCnvConversionData &, TEndianness, const TDesC8 &, TDes8 &, const TDesC16 &, TArrayOfAscendingIndices &)

IMPORT_C TIntDoConvertFromUnicode(const SCnvConversionData &aConversionData,
TEndiannessaDefaultEndiannessOfForeignCharacters,
const TDesC8 &aReplacementForUnconvertibleUnicodeCharacters,
TDes8 &aForeign,
const TDesC16 &aUnicode,
TArrayOfAscendingIndices &aIndicesOfUnconvertibleCharacters
)[static]

Parameters

const SCnvConversionData & aConversionData
TEndianness aDefaultEndiannessOfForeignCharacters
const TDesC8 & aReplacementForUnconvertibleUnicodeCharacters
TDes8 & aForeign
const TDesC16 & aUnicode
TArrayOfAscendingIndices & aIndicesOfUnconvertibleCharacters

DoConvertFromUnicode(const SCnvConversionData &, TEndianness, const TDesC8 &, TDes8 &, const TDesC16 &, TArrayOfAscendingIndices &, TUint &, TUint)

IMPORT_C TIntDoConvertFromUnicode(const SCnvConversionData &aConversionData,
TEndiannessaDefaultEndiannessOfForeignCharacters,
const TDesC8 &aReplacementForUnconvertibleUnicodeCharacters,
TDes8 &aForeign,
const TDesC16 &aUnicode,
TArrayOfAscendingIndices &aIndicesOfUnconvertibleCharacters,
TUint &aOutputConversionFlags,
TUintaInputConversionFlags
)[static]

Parameters

const SCnvConversionData & aConversionData
TEndianness aDefaultEndiannessOfForeignCharacters
const TDesC8 & aReplacementForUnconvertibleUnicodeCharacters
TDes8 & aForeign
const TDesC16 & aUnicode
TArrayOfAscendingIndices & aIndicesOfUnconvertibleCharacters
TUint & aOutputConversionFlags
TUint aInputConversionFlags

DoConvertToUnicode(const SCnvConversionData &, TEndianness, TDes16 &, const TDesC8 &, TInt &, TInt &)

IMPORT_C TIntDoConvertToUnicode(const SCnvConversionData &aConversionData,
TEndiannessaDefaultEndiannessOfForeignCharacters,
TDes16 &aUnicode,
const TDesC8 &aForeign,
TInt &aNumberOfUnconvertibleCharacters,
TInt &aIndexOfFirstByteOfFirstUnconvertibleCharacter
)[static]

Parameters

const SCnvConversionData & aConversionData
TEndianness aDefaultEndiannessOfForeignCharacters
TDes16 & aUnicode
const TDesC8 & aForeign
TInt & aNumberOfUnconvertibleCharacters
TInt & aIndexOfFirstByteOfFirstUnconvertibleCharacter

DoConvertToUnicode(const SCnvConversionData &, TEndianness, TDes16 &, const TDesC8 &, TInt &, TInt &, TUint &, TUint)

IMPORT_C TIntDoConvertToUnicode(const SCnvConversionData &aConversionData,
TEndiannessaDefaultEndiannessOfForeignCharacters,
TDes16 &aUnicode,
const TDesC8 &aForeign,
TInt &aNumberOfUnconvertibleCharacters,
TInt &aIndexOfFirstByteOfFirstUnconvertibleCharacter,
TUint &aOutputConversionFlags,
TUintaInputConversionFlags
)[static]

Parameters

const SCnvConversionData & aConversionData
TEndianness aDefaultEndiannessOfForeignCharacters
TDes16 & aUnicode
const TDesC8 & aForeign
TInt & aNumberOfUnconvertibleCharacters
TInt & aIndexOfFirstByteOfFirstUnconvertibleCharacter
TUint & aOutputConversionFlags
TUint aInputConversionFlags

DoCreateArrayOfCharacterSetsAvailableLC(RFs &, TUint)

CArrayFix< SCharacterSet > *DoCreateArrayOfCharacterSetsAvailableLC(RFs &aFileServerSession,
TUintaIdentifierOfOnlyCharacterSetOfInterest
)[private, static]

Parameters

RFs & aFileServerSession
TUint aIdentifierOfOnlyCharacterSetOfInterest

DoPrepareToConvertToOrFromL(TUint, const CArrayFix< SCharacterSet > *, RFs &)

TAvailability DoPrepareToConvertToOrFromL(TUintaCharacterSetIdentifier,
const CArrayFix< SCharacterSet > *aArrayOfCharacterSetsAvailable,
RFs &aFileServerSession
)[private]

Parameters

TUint aCharacterSetIdentifier
const CArrayFix< SCharacterSet > * aArrayOfCharacterSetsAvailable
RFs & aFileServerSession

EndiannessOfForeignCharacters(const SCnvConversionData &, TEndianness)

TEndianness EndiannessOfForeignCharacters(const SCnvConversionData &aConversionData,
TEndiannessaDefaultEndiannessOfForeignCharacters
)[private, static]

Parameters

const SCnvConversionData & aConversionData
TEndianness aDefaultEndiannessOfForeignCharacters

GetDowngradeForExoticLineTerminatingCharacters()

TDowngradeForExoticLineTerminatingCharacters GetDowngradeForExoticLineTerminatingCharacters()[inline]

NewL()

IMPORT_C CCnvCharacterSetConverter *NewL()[static]

NewLC()

IMPORT_C CCnvCharacterSetConverter *NewLC()[static]

PrepareToConvertToOrFromL(TUint, const CArrayFix< SCharacterSet > &, RFs &)

IMPORT_C voidPrepareToConvertToOrFromL(TUintaCharacterSetIdentifier,
const CArrayFix< SCharacterSet > &aArrayOfCharacterSetsAvailable,
RFs &aFileServerSession
)

Parameters

TUint aCharacterSetIdentifier
const CArrayFix< SCharacterSet > & aArrayOfCharacterSetsAvailable
RFs & aFileServerSession

PrepareToConvertToOrFromL(TUint, RFs &)

IMPORT_C TAvailabilityPrepareToConvertToOrFromL(TUintaCharacterSetIdentifier,
RFs &aFileServerSession
)

Parameters

TUint aCharacterSetIdentifier
RFs & aFileServerSession

ScanForStandardNamesAndMibEnumsL(RFs &)

voidScanForStandardNamesAndMibEnumsL(RFs &aFileServerSession)[private]

Parameters

RFs & aFileServerSession

ScanForStandardNamesAndMibEnumsROMOnlyL(RFs &)

voidScanForStandardNamesAndMibEnumsROMOnlyL(RFs &aFileServerSession)[private]

Parameters

RFs & aFileServerSession

SetDefaultEndiannessOfForeignCharacters(TEndianness)

IMPORT_C voidSetDefaultEndiannessOfForeignCharacters(TEndiannessaEndianness)

Parameters

TEndianness aEndianness

SetDowngradeForExoticLineTerminatingCharacters(TDowngradeForExoticLineTerminatingCharacters)

IMPORT_C voidSetDowngradeForExoticLineTerminatingCharacters(TDowngradeForExoticLineTerminatingCharactersaDowngradeForExoticLineTerminatingCharacters)

Parameters

TDowngradeForExoticLineTerminatingCharacters aDowngradeForExoticLineTerminatingCharacters

SetMaxCacheSize(TInt)

IMPORT_C voidSetMaxCacheSize(TIntaSize)

Parameters

TInt aSize

SetReplacementForUnconvertibleUnicodeCharactersL(const TDesC8 &)

IMPORT_C voidSetReplacementForUnconvertibleUnicodeCharactersL(const TDesC8 &aReplacementForUnconvertibleUnicodeCharacters)

Parameters

const TDesC8 & aReplacementForUnconvertibleUnicodeCharacters

Member Enumerations Documentation

Enum anonymous

Output flag used to indicate whether or not a character in the source descriptor is the first half of a surrogate pair, but is the last character in the descriptor to convert.

Note: This enumeration can be used in the DoConvertToUnicode() and DoConvertFromUnicode() functions. These are part of the Character Conversion Plug-in Provider API and are for use by plug-in conversion libraries only. 6.0

Enumerators

EInputConversionFlagAppend = 0x00010000

Appends the converted text to the output descriptor.

EInputConversionFlagAllowTruncatedInputNotEvenPartlyConsumable = 0x00020000

By default, when the input descriptor passed to DoConvertFromUnicode() or DoConvertToUnicode() consists of nothing but a truncated sequence, the error-code EErrorIllFormedInput is returned. If this behaviour is undesirable, the input flag EInputConversionFlagAllowTruncatedInputNotEvenPartlyConsumable should be set.

EInputConversionFlagStopAtFirstUnconvertibleCharacter = 0x00040000

Stops converting when the first unconvertible character is reached.

EInputConversionFlagMustEndInDefaultCharacterSet = 0x00080000

Appends the default character set Escape sequence at end of converted text

EInputConversionFlagAssumeStartInDefaultCharacterSet = 0x00100000

Enum anonymous

Enumerators

EOutputConversionFlagInputIsTruncated = 0x01000000

Indicates whether or not the source descriptor ends in a truncated sequence, e.g. the first half only of a surrogate pair.

Enum anonymous

Enumerators

ELowestThreshold = 25

The lowest confidence value for a character set accepted by Autodetect

Enum anonymous

Enumerators

EStoredFlagOwnsConversionData = 0x00000001
EStoredFlagConversionPlugInLibraryIsLoaded = 0x00000002

Enum TAvailability

Indicates whether a character set is available or unavailable for conversion. Used by the second overload of PrepareToConvertToOrFromL().

Enumerators

EAvailable

The requested character set can be converted.

ENotAvailable

The requested character set cannot be converted.

Enum TCharacterSetSearch

Enumerators

EStopCharacterSetSearch
EContinueCharacterSetSearch

Enum TConversionPlugInFunctionOrdinals

Enumerators

EReplacementForUnconvertibleUnicodeCharacters = 1
EConvertFromUnicode = 2
EConvertToUnicode = 3
EIsInThisCharacterSet = 4

Enum TDowngradeForExoticLineTerminatingCharacters

Downgrade for line and paragraph separators

Enumerators

EDowngradeExoticLineTerminatingCharactersToCarriageReturnLineFeed

Paragraph/line separators should be downgraded (if necessary) into carriage return and line feed pairs.

EDowngradeExoticLineTerminatingCharactersToJustLineFeed

Paragraph/line separators should be downgraded (if necessary) into a line feed only.

Enum TEndianness

Specifies the default endian-ness of the current character set. Used by SetDefaultEndiannessOfForeignCharacters().

Enumerators

ELittleEndian

The character set is big-endian.

EBigEndian

The character set is little-endian.

Enum TError

Conversion error flags. At this stage there is only one error flag- others may be added in the future.

Enumerators

EErrorIllFormedInput = KErrCorrupt

The input descriptor contains a single corrupt character. This might occur when the input descriptor only contains some of the bytes of a single multi-byte character.

Member Data Documentation

TUint iCharacterSetIdentifierOfLoadedConversionData

TUint iCharacterSetIdentifierOfLoadedConversionData[private]

CCharsetCnvCache * iCharsetCnvCache

CCharsetCnvCache *iCharsetCnvCache[private]

const SCnvConversionData * iConversionData

const SCnvConversionData *iConversionData[private]

TEndianness iDefaultEndiannessOfForeignCharacters

TEndianness iDefaultEndiannessOfForeignCharacters[private]

TDowngradeForExoticLineTerminatingCharacters iDowngradeForExoticLineTerminatingCharacters

TDowngradeForExoticLineTerminatingCharacters iDowngradeForExoticLineTerminatingCharacters[private]

TBool iIsSystemStandardNamesAndMibEnumsScanned

TBool iIsSystemStandardNamesAndMibEnumsScanned[private]

TBuf8< KMaximumLengthOfReplacementForUnconvertibleUnicodeCharacters > iReplacementForUnconvertibleUnicodeCharacters

TBuf8< KMaximumLengthOfReplacementForUnconvertibleUnicodeCharacters >iReplacementForUnconvertibleUnicodeCharacters[private]

CStandardNamesAndMibEnums * iStandardNamesAndMibEnums

CStandardNamesAndMibEnums *iStandardNamesAndMibEnums[private]

TUint iStoredFlags

TUint iStoredFlags[private]

TBool iTlsDataConstructed

TBool iTlsDataConstructed[private]