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