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()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

ConvertToUcs2L(TUint, const TDesC8 &)

IMPORT_C HBufC16 *ConvertToUcs2L(TUintaEncoding,
const TDesC8 &aBuffer
)const

Converts the given native buffer into ucs2.

Since
3.0

Parameters

TUint aEncodingThe encoding.
const TDesC8 & aBufferThe native buffer.

ConvertToUtf8L(TUint, const TDesC8 &)

IMPORT_C HBufC8 *ConvertToUtf8L(TUintaEncoding,
const TDesC8 &aBuffer
)const

Converts the given native buffer into utf8.

Since
3.0

Parameters

TUint aEncodingThe encoding.
const TDesC8 & aBufferThe native buffer.

ConvertToUtf8L(HBufC16 &)

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

Converts the given ucs2 buffer into utf8.

Since
3.0

Parameters

HBufC16 & aUsc2BufferThe 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 & aBufferThe native buffer.
TUint & aEncodingThe 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 & aBufferThe native buffer.
TUint & aEncodingThe resulting encoding.

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

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

Determine the char-encoding.

Since
3.0

Parameters

const TDesC8 & aBufferThe native buffer.
const TDesC & aCharSetThe char-set provided by the orignal source
TUint & aEncodingThe 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 & aBufferThe native buffer.
TInt & aBeginThe beginning of the attribute.
TInt & aEndThe end of the attribute.
TInt & aValueBeginThe beginning of the encoding's value.
TInt & aValueEndThe 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 & aBufferThe ucs2 buffer.
TInt & aBeginThe beginning of the attribute.
TInt & aEndThe end of the attribute.
TInt & aValueBeginThe beginning of the encoding's value.
TInt & aValueEndThe 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 & aCharEncodingThe encoding.
TUint & aUidThe resulting uid for the given encoding.

StripCharEncoding(HBufC8 &)

voidStripCharEncoding(HBufC8 &aUtf8Buffer)const

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

Since
3.0

Parameters

HBufC8 & aUtf8BufferThe utf8 buffer.

StripCharEncoding(HBufC16 &)

voidStripCharEncoding(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]