TCodePageUtils Class Reference

class TCodePageUtils

A utility class for Codepage Dll . Controls overflow action. Provides current status of Locale/codepage dll loaded. Provides conversions functions to be used by Codepage Dlls.

Constructor & Destructor Documentation

TCodePageUtils()

TCodePageUtils ( )

Constructor for TCodePageUtils .

Member Functions Documentation

CodepageFatUtilityFunctions()

TCodePageFunctions CodepageFatUtilityFunctions ( ) const

Gets structure to function pointers to the read Codepage conversions functions.

CodepageLoaded()

TCodepageLoaded CodepageLoaded ( ) const

Returns the type of active codepage.

ConvertFromUnicode(TDes8 &, const TDesC16 &, TOverflowAction)

TBool ConvertFromUnicode ( TDes8 & aForeign,
const TDesC16 & aUnicode,
TOverflowAction aOverflowAction
) const

Convert from Unicode, truncating if there is not enough room in the output.

Parameters

TDes8 & aForeign The output is appended here.
const TDesC16 & aUnicode The input.
TOverflowAction aOverflowAction

ConvertFromUnicodeL(TDes8 &, const TDesC16 &, TOverflowAction)

IMPORT_C void ConvertFromUnicodeL ( TDes8 & aForeign,
const TDesC16 & aUnicode,
TOverflowAction aOverflowAction = EOverflowActionLeave
) const

Convert from Unicode, truncating if there is not enough room in the output.

leave
KErrOverflow if aForeign is too short for the output.

Parameters

TDes8 & aForeign The output is appended here.
const TDesC16 & aUnicode The input.
TOverflowAction aOverflowAction = EOverflowActionLeave

ConvertToUnicode(TDes16 &, const TDesC8 &)

TBool ConvertToUnicode ( TDes16 & aUnicode,
const TDesC8 & aForeign
) const

Parameters

TDes16 & aUnicode
const TDesC8 & aForeign

ConvertToUnicodeL(TDes16 &, const TDesC8 &, TOverflowAction)

IMPORT_C void ConvertToUnicodeL ( TDes16 & aUnicode,
const TDesC8 & aForeign,
TOverflowAction aOverflowAction = EOverflowActionLeave
) const

Parameters

TDes16 & aUnicode
const TDesC8 & aForeign
TOverflowAction aOverflowAction = EOverflowActionLeave

IsCodepageLoaded()

TBool IsCodepageLoaded ( ) const

Returns whether a Codepage dll is loaded.

IsLegalShortNameCharacter(TUint, TBool)

IMPORT_C TBool IsLegalShortNameCharacter ( TUint aCharacter,
TBool aUseExtendedChars = EFalse
) const

Returns true if the input character is legal in a short name.

Parameters

TUint aCharacter Character, in the foreign character encoding.
TBool aUseExtendedChars = EFalse

LocaleFatUtilityFunctions()

TFatUtilityFunctions * LocaleFatUtilityFunctions ( ) const

Gets the function pointer to the read Locale conversions functions.

SetLocaleCodePage(TFatUtilityFunctions *)

void SetLocaleCodePage ( TFatUtilityFunctions * aFunctions )

Sets the current codepage to that provided by the current Locale DLL.

Parameters

TFatUtilityFunctions * aFunctions Pointer to FAT conversion functions to be used.

Member Enumerations Documentation

Enum TCodepageLoaded

Determines the current status of Locale dll / Codepage dll.

Enumerators

ENone = 0

No Locale Dll or Codepage Dll is loaded.

ELocaleDll

Locale Dll is loaded.

ECodePageDll

Codepage Dll is loaded.

Enum TOverflowAction

Determines the Overflow action in case of if overflow occurs.

Enumerators

EOverflowActionLeave

Will leave if an overflow occurs.

EOverflowActionTruncate

Will truncate the data if an overflow occurs.

Member Data Documentation

TCodePageFunctions iCodePageFunctions

TCodePageFunctions iCodePageFunctions [private]

Structure to function pointers to the read Codepage conversions functions.

TCodepageLoaded iCodepageLoaded

TCodepageLoaded iCodepageLoaded [private]

Variable to hold the active codepage type.

TFatUtilityFunctions * iLocaleFatUtilityFunctions

TFatUtilityFunctions * iLocaleFatUtilityFunctions [private]

Function pointer to the read Locale conversions functions.