Interface to iconv.h
character-conversion routines.
More...
#include <ddcIconv.h>
Interface to iconv.h
character-conversion routines.
ddcIconv::ddcIconv | ( | const std::string & | srcEncoding = "" , |
|
const std::string & | dstEncoding = "" | |||
) | [inline] |
Default constructor, given optional source and destination encodings
References PTOP.
ddcIconv::~ddcIconv | ( | void | ) | [inline] |
Default destructor
References PTOP.
bool ddcIconv::empty | ( | void | ) | const [inline] |
Check whether selected conversion is a null-op.
bool ddcIconv::valid | ( | void | ) | const [inline] |
Check whether selected converter is valid.
bool ddcIconv::good | ( | void | ) | const [inline] |
Check whether selected converter is a either valid or a null-op
Referenced by CLemmatizer::initIconv().
bool ddcIconv::open | ( | const std::string & | srcEncoding, | |
const std::string | dstEncoding | |||
) | [inline] |
Open a (new) encoding. Either srcEncoding
or dstEncoding
may be empty or "-", indicating a null-op.
References PTOP.
bool ddcIconv::close | ( | void | ) | [inline] |
Close a conversion. Should be ok to call more than once
References PTOP.
void ddcIconv::reset | ( | void | ) | [inline] |
Reset converter state (should already have mut lock in threaded applications)
bool ddcIconv::convert | ( | const string & | in, | |
string & | out | |||
) | [inline] |
Perform selected conversion from in
to out
References DDC_ICONV_BUFLEN, and PTOP.
Referenced by CLemmatizer::recode_ext2int(), and CLemmatizer::recode_int2ext().
std::string ddcIconv::convert | ( | const std::string & | in | ) | [inline] |
Perform selected conversion from in
to a (new) string
string ddcIconv::enc_src |
source encoding
string ddcIconv::enc_dst |
destination encoding
iconv_t ddcIconv::ic |
underlying iconv object
char ddcIconv::ibuf[256] |
input buffer
char ddcIconv::obuf[256] |
output buffer
pthread_mutex_t ddcIconv::mut |
pthread mutex