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,
TOverflowActionaOverflowAction
)const

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

Parameters

TDes8 & aForeignThe output is appended here.
const TDesC16 & aUnicodeThe input.
TOverflowAction aOverflowAction

ConvertFromUnicodeL(TDes8 &, const TDesC16 &, TOverflowAction)

IMPORT_C voidConvertFromUnicodeL(TDes8 &aForeign,
const TDesC16 &aUnicode,
TOverflowActionaOverflowAction = 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 & aForeignThe output is appended here.
const TDesC16 & aUnicodeThe 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 voidConvertToUnicodeL(TDes16 &aUnicode,
const TDesC8 &aForeign,
TOverflowActionaOverflowAction = 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 TBoolIsLegalShortNameCharacter(TUintaCharacter,
TBoolaUseExtendedChars = EFalse
)const

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

Parameters

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

LocaleFatUtilityFunctions()

TFatUtilityFunctions *LocaleFatUtilityFunctions()const

Gets the function pointer to the read Locale conversions functions.

SetLocaleCodePage(TFatUtilityFunctions *)

voidSetLocaleCodePage(TFatUtilityFunctions *aFunctions)

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

Parameters

TFatUtilityFunctions * aFunctionsPointer 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.