CCnvCharacterSetConverter::SCharacterSet Struct Reference

#include <charconv.h>

struct CCnvCharacterSetConverter::SCharacterSet
Public Member Functions
TUint Identifier()
TPtrC Name()
TBool NameIsFileName()

Detailed Description

Stores information about a non-Unicode character set. The information is used to locate the conversion information required by ConvertFromUnicode() and ConvertToUnicode().

An array of these structs that contain all available character sets can be generated by CreateArrayOfCharacterSetsAvailableLC() and CreateArrayOfCharacterSetsAvailableL(), and is used by one of the overloads of PrepareToConvertToOrFromL().

Member Function Documentation

Identifier ( )

TUint Identifier()const [inline]

Gets the character sets UID.

Returns: The UID of the character set.

Name ( )

TPtrC Name()const [inline]

Gets the full path and filename of the DLL which implements conversion for the character set.

If the character set is one for which conversion is built into Symbian OS rather than implemented by a plug in DLL, the function just returns the name of the character set. The NameIsFileName() function can be used to determine whether or not it is legal to create a TParsePtrC object over the descriptor returned by Name().

Notes:

The name returned cannot be treated as an Internet-standard name, it is locale-independent and should be mapped to the locale-dependent name by software at a higher level before being shown to the user. Conversion from Internet-standard names of character sets to the UID identifiers is provided by the member function ConvertStandardNameOfCharacterSetToIdentifierL().

Typically, to find the user-displayable name (as opposed to the internet-standard name) of a character set, you would do something like this:

		const CCnvCharacterSetConverter::SCharacterSet& characterSet=...;
		const TPtrC userDisplayable(characterSet.NameIsFileName()? TParsePtrC(characterSet.Name()).Name(): 
		characterSet.Name()); 

Returns: Full path and filename of the character set converter plug in DLL, or just the name of the character set.

NameIsFileName ( )

TBool NameIsFileName()const [inline]

Tests whether a filename given by the function SCharacterSet::Name() is a real file name (i.e. conversion is provided by a plug in DLL), or just the character set name (i.e. conversion is built into Symbian OS).

Note: If the function returns ETrue then the path and filename can be parsed using TParse or TParsePtrC functions to obtain just the filename.

Returns: ETrue if the name is a real filename. EFalse if it is just the character set name.