371
371
RCC_OPTION_AUTODETECT_FS_TITLES, /**< Detect titles of #RCC_CLASS_FS classes */
372
372
RCC_OPTION_AUTODETECT_FS_NAMES, /**< Try to find encoding of #RCC_CLASS_FS by accessing fs */
373
373
RCC_OPTION_CONFIGURED_LANGUAGES_ONLY, /**< Use only configured languages or languages with auto-engines */
374
RCC_OPTION_TRANSLATE, /**< Translate #rcc_string if it's language differs from current one */
375
RCC_OPTION_AUTOENGINE_SET_CURRENT, /**< If enabled autodetection engine will set current charset */
909
911
* - NULL if no recoding is required
910
912
* - Pointer on initialized context if successful
911
* - Pointer on errnous context in the case of error
913
914
rcc_iconv rccIConvOpen(const char *from, const char *to);
920
921
* Recodes chunk of data.
922
923
* @param icnv is recoding context
923
* @param outbuf is preallocated output buffer
924
* @param outsize is size of output buffer (striped string will be returned if buffer to small)
925
924
* @param buf is data for recoding
926
* @param size is size of the data
927
* @return number of recoded bytes in output buffer or -1 in the case of error
929
size_t rccIConvRecode(rcc_iconv icnv, char *outbuf, size_t outsize, const char *buf, size_t size);
925
* @param len is size of the data
926
* @param rlen is size of recoded data
927
* @return recoded string or NULL in the case of error
929
char *rccIConv(rcc_iconv icnv, const char *buf, size_t len, size_t *rlen);
932
* translating context
934
typedef struct rcc_translate_t *rcc_translate;
938
* Open translating context.
940
* @param from is source language
941
* @param to is destination language
943
* - NULL if translation is not required or possible
944
* - Pointer on initialized context if successful
946
rcc_translate rccTranslateOpen(const char *from, const char *to);
948
* Close translating context.
950
* @param translate is translating context
952
void rccTranslateClose(rcc_translate translate);
955
* Set translation timeout
957
* @param translate is translating context
958
* @param us is timeout in microseconds (0 - no timeout)
959
* @return non-zero value is returned in the case of errror
961
int rccTranslateSetTimeout(rcc_translate translate, unsigned long us);
966
* @param translate is translating context
967
* @param buf is UTF-8 encoded string for translating
968
* @return recoded string or NULL in the case of error
970
char *rccTranslate(rcc_translate translate, const char *buf);
1120
1161
#define RCC_CC_FLAG_HAVE_RCD 0x08
1163
* Libtranslate translation engine compiled in
1165
#define RCC_CC_FLAG_HAVE_LIBTRANSLATE 0x10
1122
1168
* The library build environment is represented by this structure
1124
1170
struct rcc_compiled_configuration_t {