TBool IsInThisCharacterSetL(TBool& aSetToTrue, TInt& aConfidenceLevel, const TDesC8& aSample);
Support
Supported from 6.1
Description
A function which must be implemented by a character
conversion plug-in DLL to calculate how probable it is that a sample piece of text is encoded in this character set.
This function was added in 6.1 as the 4th-ordinal exported function in the plug-in DLL interface. It is
called by CCnvCharacterSetConverter::AutoDetectCharacterSetL()
for each character conversion plug-in DLL.
Parameters
TBool& aSetToTrue |
This value should be set to ETrue . It is used to indicate to CCnvCharacterSetConverter::AutoDetectCharacterSetL() that the plug-in DLL is implementing a function of this signature and is therefore not the empty, reserved function that was previously exported at the 4th ordinal position in the plug-in DLL in v6.0. |
TInt& aConfidenceLevel |
On return, indicates how confident the function is about its return value. Set to a value between 0 and 100. Zero indicates no confidence, (and the return value should be disregarded), 100 indicates total confidence. |
const TDesC8& aSample |
The sample text string, as passed to CCnvCharacterSetConverter::AutoDetectCharacterSetL() . |
|
Return value
TBool |
ETrue if it is more probable that the sample text is encoded in this character set than not. EFalse if it is more probable that the sample text is not encoded in this character set. The confidence level applies to this value.
|
|
Notes:
- The function returns true or false. Although it is valid for a character set to return false with the confidence level set to any value between 0 and 100, in practice only character sets which have a particular byte structure, or in which certain byte values are illegal (e.g. UTF-8) will return false, and will usually do so with a high confidence level. Other character sets (e.g. Code Page 1252) will normally only return true, but with variable confidence.
See also: