|
|
Class to convert character sets
This class implements converting strings between charsets and encodings.
enum |
Conversion flags
They can be use to specify how some characters can be converted.
INPUT_AMP_SEQUENCES - convert amp-sequences on input to coresponding characters OUTPUT_AMP_SEQUENCES - convert unknown characters to amp-sequences AMP_SEQUENCES - two above together UNKNOWN_TO_ASCII - convert unknown characters to ASCII equivalents (not implemented yet) UNKNOWN_TO_QUESTION_MARKS - convert unknown characters to '?'
|
Constructor. Start conversion to displayable charset
Parameters:
inputCharset | source charset |
flags | conversion flags. |
|
Constructor. Start conversion between two charsets
Parameters:
inputCharset | source charset |
outputCharset | destination charset |
flags | conversion flags. KCharsetConverter |
~ |
Destructor.
bool |
Did constructor suceed.
Returns: TRUE if conversion can be made, FALSE if wrong arguments were given to constructor
const KCharsetConversionResult & |
String conversion routine
Convert string between charsets
Parameters:
str | string to convert |
Returns: converted string with charset info
const QList<KCharsetConversionResult> & |
String conversion routine for multiple charsets
Convert string between charsets
Parameters:
str | string to convert |
Returns: converted string divided into chunks of the same charsets
const char * |
Charset of converted strings
Returns: charset of strings converted using convert(const char *)
const KCharsetConversionResult & |
Unicode to displayable character conversion
Currently works only for characters in output charset
Parameters:
code | Unicode represantation of character |
const KCharsetConversionResult & |
Character tag to displayable character conversion
Useful for converting HTML entities, but not only Currently it works only for characters in output charset
Parameters:
tag | character tag or whole amp-sequence |
const KCharsetConversionResult & |