ocean.text.util.StringEncode

Character encoding conversion.

Character encoding conversion using the C iconv library (ocean.text.util.c.Iconv).

Usage: This module can be used by creating an instance of the StringEncode class with the template parameters of the desired character encoding conversion:

auto string_enc = new StringEncode!("ISO-8859-1", "UTF-8");

The conversion function is called as follows:

char[] input = "A string to be converted";
char[] output; // The buffer which is written into

string_enc.convert(input, output);

Members

Classes

IconvException
class IconvException

IconvException

IncompleteMbSeq
class IncompleteMbSeq

Incomplete Multibyte Sequence

InvalidMbSeq
class InvalidMbSeq

Invalid Multibyte Sequence

StringEncode
class StringEncode(istring fromcode, istring tocode)

StringEncode class The template parameters are the character encoding types for the input and output of the converter.

StringEncoderSequence
class StringEncoderSequence(Encoders...)

String encoder sequence. Runs a sequence of encoders over a string until one achieves a successful encoding.

Interfaces

StringEncoder
interface StringEncoder

Encoder interface.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).