Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: VUTIL.H
Link against: versit.lib

Class CVersitUnicodeUtils

class CVersitUnicodeUtils : public CBase;

Description

Versit Unicode utilities class.

This enables conversion between Unicode and ISO character sets.

Derivation

Members

Defined in CVersitUnicodeUtils:
CharacterSetConverter(), ConvertStandardNameL(), CreateConverterL(), NarrowL(), NarrowLC(), StandardNameL(), WidenL(), WidenLC(), ~CVersitUnicodeUtils()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


~CVersitUnicodeUtils()

IMPORT_C ~CVersitUnicodeUtils();

Description

Frees all resources owned by the object, prior to its destruction.

[Top]


Member functions


NarrowL()

IMPORT_C HBufC8 *NarrowL(const TDesC &aDesC);

Description

Converts a string from Unicode to Code Page 1252.

Parameters

const TDesC &aDesC

The Unicode string to be converted.

Return value

HBufC8 *

A pointer to a Code Page 1252 string. The caller takes ownership.


NarrowLC()

IMPORT_C HBufC8 *NarrowLC(const TDesC &aDesC);

Description

Converts a string from Unicode to Code Page 1252.

Parameters

const TDesC &aDesC

The Unicode string to be converted.

Return value

HBufC8 *

A pointer to a Code Page 1252 string. The pointer is left on the cleanup stack. The caller takes ownership.


WidenL()

IMPORT_C HBufC *WidenL(const TDesC8 &aDesC8);

Description

Converts a string from Code Page 1252 into Unicode.

Parameters

const TDesC8 &aDesC8

The Code Page 1252 string to be converted.

Return value

HBufC *

Pointer to the string converted into Unicode. The caller takes ownership.


WidenLC()

IMPORT_C HBufC *WidenLC(const TDesC8 &aDesC8);

Description

Converts a string from Code Page 1252 into Unicode.

Parameters

const TDesC8 &aDesC8

The Code Page 1252 string to be converted.

Return value

HBufC *

Pointer to the string converted into Unicode. The pointer is left on the cleanup stack. The caller takes ownership.


CreateConverterL()

IMPORT_C void CreateConverterL();

Description

Creates a converter for converting between Unicode and Code Page 1252.

Any unconvertible Unicode characters are converted into question marks.


CharacterSetConverter()

inline CCnvCharacterSetConverter &CharacterSetConverter() const;

Description

Returns the character set converter created in CreateConverterL().

Return value

CCnvCharacterSetConverter &

A character set converter.


ConvertStandardNameL()

inline TUint ConvertStandardNameL(const TDesC8 &aStandardNameOfCharacterSet);

Description

Returns the Symbian OS UID for a character set from its Internet-standard name.

Parameters

const TDesC8 &aStandardNameOfCharacterSet

Internet-standard name of a character set encoded in 8-bit ASCII.

Return value

TUint

The Symbian OS UID of the specified character set. If the name is not known, zero is returned.


StandardNameL()

inline HBufC8 *StandardNameL(TUint aCharSetId);

Description

Returns the Internet-standard name of a character set, from its Symbian OS UID.

Parameters

TUint aCharSetId

The Symbian OS UID of a character set.

Return value

HBufC8 *

The Internet-standard name or MIME name of the specified character set, or NULL if the UID is not known. The name is encoded in 8-bit ASCII.