Converter

Converts various Unicode encoding formats to UTF-8.

Members

Functions

UTF16toUTF8
char[] UTF16toUTF8(const(ubyte)[] data)

Converts a UTF-16 text to UTF-8.

UTF32toUTF8
char[] UTF32toUTF8(const(ubyte)[] data)

Converts a UTF-32 text to UTF-8.

data2UTF8
char[] data2UTF8(ubyte[] data)

Converts the text in data to UTF-8. Leaves data unchanged if it is in UTF-8 already.

Static functions

BEtoMachineDword
dchar BEtoMachineDword(dchar c)

Swaps the bytes of c on a little-endian machine.

BEtoMachineWord
wchar BEtoMachineWord(wchar c)

Swaps the bytes of c on a little-endian machine.

LEtoMachineDword
dchar LEtoMachineDword(dchar c)

Swaps the bytes of c on a big-endian machine.

LEtoMachineWord
wchar LEtoMachineWord(wchar c)

Swaps the bytes of c on a big-endian machine.

swapBytes
dchar swapBytes(dchar c)

Byte-swaps c.

swapBytes
wchar swapBytes(wchar c)

Byte-swaps c.

Variables

filePath
cstring filePath;

For error messages.

Meta