|
VMime
|
#include <charsetConverter_idna.hpp>


Public Member Functions | |
| charsetConverter_idna (const charset &source, const charset &dest, const charsetConverterOptions &opts=charsetConverterOptions()) | |
| ~charsetConverter_idna () | |
| void | convert (const string &in, string &out, status *st=NULL) |
| void | convert (utility::inputStream &in, utility::outputStream &out, status *st=NULL) |
| shared_ptr< utility::charsetFilteredOutputStream > | getFilteredOutputStream (utility::outputStream &os, const charsetConverterOptions &opts=charsetConverterOptions()) |
Additional Inherited Members | |
Static Public Member Functions inherited from charsetConverter | |
| static shared_ptr< charsetConverter > | create (const charset &source, const charset &dest, const charsetConverterOptions &opts=charsetConverterOptions()) |
Protected Member Functions inherited from object | |
| object () | |
| object (const object &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
A charset converter which can convert to and from Punycode (for IDNA).
| charsetConverter_idna | ( | const charset & | source, |
| const charset & | dest, | ||
| const charsetConverterOptions & | opts = charsetConverterOptions() |
||
| ) |
Construct and initialize an IDNA charset converter.
| source | input charset |
| dest | output charset |
| opts | conversion options |
Convert a string buffer from one charset to another charset (in-memory conversion)
| in | input buffer |
| out | output buffer |
| st | will receive some extra infos when conversion is finished or stopped by an error (can be NULL) |
| exceptions::illegal_byte_sequence_for_charset | if an illegal byte sequence was found in the input bytes, and the 'silentlyReplaceInvalidSequences' flag is set to false in the charsetConverterOptions |
| exceptions::charset_conv_error | if an unexpected error occurred during the conversion |
Implements charsetConverter.
References charset::convert(), vmime::dynamicCast(), vmime::end(), charsetConverter::status::inputBytesRead, stringUtils::is7bit(), and vmime::charsets::UTF_8.
Referenced by charsetConverter_idna::convert().
|
virtual |
Convert the contents of an input stream in a specified charset to another charset and write the result to an output stream.
| in | input stream to read data from |
| out | output stream to write the converted data |
| st | will receive some extra infos when conversion is finished or stopped by an error (can be NULL) |
| exceptions::illegal_byte_sequence_for_charset | if an illegal byte sequence was found in the input bytes, and the 'silentlyReplaceInvalidSequences' flag is set to false in the charsetConverterOptions |
| exceptions::charset_conv_error | if an unexpected error occurred during the conversion |
Implements charsetConverter.
References vmime::utility::bufferedStreamCopy(), charsetConverter_idna::convert(), and vmime::dynamicCast().
|
virtual |
Returns a filtered output stream which applies a charset conversion to input bytes.
Please note that it may not be supported by the converter.
| os | stream into which filtered data will be written |
| opts | conversion options |
Implements charsetConverter.
References vmime::dynamicCast().