Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXUTF8Codec Class Reference

#include <FXUTF8Codec.h>

List of all members.

Public Methods

 FXUTF8Codec ()
 Constructor.

virtual unsigned long fromUnicode (FXuchar *&dest, unsigned long m, const FXwchar *&src, unsigned long n)
 Convert to UTF8; return the number of bytes written to dest.

virtual unsigned long toUnicode (FXwchar *&dest, unsigned long m, const FXuchar *&src, unsigned long n)
 Convert a sequence of bytes from UTF-8; return the number of bytes read from src.

virtual const FXchar * mimeName () const
virtual FXint mibEnum () const
virtual ~FXUTF8Codec ()
 Destructor.


Detailed Description

Codec for UTF-8


Member Function Documentation

unsigned long FX::FXUTF8Codec::fromUnicode FXuchar *&    dest,
unsigned long    m,
const FXwchar *&    src,
unsigned long    n
[virtual]
 

Convert a sequence of wide characters from Unicode to UTF-8. Reads at most n wide characters from src and writes at most m bytes into dest. Returns the number of characters actually written into dest.

On exit, the src and dest pointers are updated to point to the next available character (or byte) for reading (writing).

unsigned long FX::FXUTF8Codec::toUnicode FXwchar *&    dest,
unsigned long    m,
const FXuchar *&    src,
unsigned long    n
[virtual]
 

Convert a sequence of bytes in UTF-8 encoding to a sequence of wide characters (Unicode). Reads at most n bytes from src and writes at most m characters into dest. Returns the number of characters actually read from src.

On exit, the src and dest pointers are updated to point to the next available byte (or character) for writing (reading).

const FXchar * FX::FXUTF8Codec::mimeName   const [virtual]
 

Return the IANA mime name for this codec; this is used for example as "text/utf-8" in drag and drop protocols.

FXint FX::FXUTF8Codec::mibEnum   const [virtual]
 

Return the Management Information Base (MIBenum) for the character set.