CXmlEncoding Class Reference

class CXmlEncoding : public CBase

A misc. char-encoding related utilities.

Library: FeedsEngine.lib

Since
3.0

Inherits from

Nested Classes and Structures

Constructor & Destructor Documentation

CXmlEncoding()

CXmlEncoding ( ) [private]

C++ default constructor.

~CXmlEncoding()

~CXmlEncoding ( ) [virtual]

Destructor.

Member Functions Documentation

ConstructL()

void ConstructL ( ) [private]

By default Symbian 2nd phase constructor is private.

ConvertToUcs2L(TUint, const TDesC8 &)

IMPORT_C HBufC16 * ConvertToUcs2L ( TUint aEncoding,
const TDesC8 & aBuffer
) const

Converts the given native buffer into ucs2.

Since
3.0

Parameters

TUint aEncoding The encoding.
const TDesC8 & aBuffer The native buffer.

ConvertToUtf8L(TUint, const TDesC8 &)

IMPORT_C HBufC8 * ConvertToUtf8L ( TUint aEncoding,
const TDesC8 & aBuffer
) const

Converts the given native buffer into utf8.

Since
3.0

Parameters

TUint aEncoding The encoding.
const TDesC8 & aBuffer The native buffer.

ConvertToUtf8L(HBufC16 &)

HBufC8 * ConvertToUtf8L ( HBufC16 & aUsc2Buffer ) const [private]

Converts the given ucs2 buffer into utf8.

Since
3.0

Parameters

HBufC16 & aUsc2Buffer The ucs2 buffer.

DetermineCharEncodingFromBom(const TDesC8 &, TUint &)

TBool DetermineCharEncodingFromBom ( const TDesC8 & aBuffer,
TUint & aEncoding
) const

Determine the char-encoding from the BOM.

Since
3.0

Parameters

const TDesC8 & aBuffer The native buffer.
TUint & aEncoding The resulting encoding.

DetermineCharEncodingFromXmlProlog(const TDesC8 &, TUint &)

TBool DetermineCharEncodingFromXmlProlog ( const TDesC8 & aBuffer,
TUint & aEncoding
) const

Determine the char-encoding from the char-encoding in the xml-prolog.

Since
3.1

Parameters

const TDesC8 & aBuffer The native buffer.
TUint & aEncoding The resulting encoding.

DetermineCharEncodingL(const TDesC8 &, const TDesC &, TUint &)

IMPORT_C TBool DetermineCharEncodingL ( const TDesC8 & aBuffer,
const TDesC & aCharSet,
TUint & aEncoding
) const

Determine the char-encoding.

Since
3.0

Parameters

const TDesC8 & aBuffer The native buffer.
const TDesC & aCharSet The char-set provided by the orignal source
TUint & aEncoding The resulting encoding.

FindEncoding(const TDesC8 &, TInt &, TInt &, TInt &, TInt &)

TBool FindEncoding ( const TDesC8 & aBuffer,
TInt & aBegin,
TInt & aEnd,
TInt & aValueBegin,
TInt & aValueEnd
) const [private]

Finds the location of the encoding attribute in the xml-prolog.

Since
3.0

Parameters

const TDesC8 & aBuffer The native buffer.
TInt & aBegin The beginning of the attribute.
TInt & aEnd The end of the attribute.
TInt & aValueBegin The beginning of the encoding's value.
TInt & aValueEnd The end of the encoding's value

FindEncoding(const TDesC &, TInt &, TInt &, TInt &, TInt &)

TBool FindEncoding ( const TDesC & aBuffer,
TInt & aBegin,
TInt & aEnd,
TInt & aValueBegin,
TInt & aValueEnd
) const [private]

Finds the location of the encoding attribute in the xml-prolog.

Since
3.0

Parameters

const TDesC & aBuffer The ucs2 buffer.
TInt & aBegin The beginning of the attribute.
TInt & aEnd The end of the attribute.
TInt & aValueBegin The beginning of the encoding's value.
TInt & aValueEnd The end of the encoding's value

NewL()

IMPORT_C CXmlEncoding * NewL ( ) [static]

Two-phased constructor.

ResolveCharEncodingL(const TDesC8 &, TUint &)

TBool ResolveCharEncodingL ( const TDesC8 & aCharEncoding,
TUint & aUid
) const

Resolves the given char-encoding into its uid.

Since
3.0

Parameters

const TDesC8 & aCharEncoding The encoding.
TUint & aUid The resulting uid for the given encoding.

StripCharEncoding(HBufC8 &)

void StripCharEncoding ( HBufC8 & aUtf8Buffer ) const

Erase the char-encoding attribute (if any) from the xml-prolog.

Since
3.0

Parameters

HBufC8 & aUtf8Buffer The utf8 buffer.

StripCharEncoding(HBufC16 &)

void StripCharEncoding ( HBufC16 & aUcs2Buffer ) const

Erase the char-encoding attribute (if any) from the xml-prolog.

Since
3.0

Parameters

HBufC16 & aUcs2Buffer

Member Data Documentation

RArray< SupportedEncodings > iCharEncodings

RArray < SupportedEncodings > iCharEncodings [private]

CCnvCharacterSetConverter * iConverter

CCnvCharacterSetConverter * iConverter [private]

RFs iRfs

RFs iRfs [private]