#include "ut_types.h"
Go to the source code of this file.
Defines | |
#define | UT_ICONV_INVALID ((UT_iconv_t)(-1)) |
#define | UCS_2_INTERNAL ucs2Internal() |
#define | UCS_INTERNAL ucs4Internal() |
Typedefs | |
typedef void * | UT_iconv_t |
Functions | |
G_BEGIN_DECLS ABI_EXPORT const char * | ucs2Internal () |
ABI_EXPORT const char * | ucs4Internal () |
ABI_EXPORT UT_iconv_t | UT_iconv_open (const char *to, const char *from) |
ABI_EXPORT size_t | UT_iconv (UT_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) |
ABI_EXPORT int | UT_iconv_close (UT_iconv_t cd) |
ABI_EXPORT void | UT_iconv_reset (UT_iconv_t cd) |
ABI_EXPORT int | UT_iconv_isValid (UT_iconv_t cd) |
ABI_EXPORT char * | UT_convert (const char *str, UT_sint32 len, const char *from_codeset, const char *to_codeset, UT_uint32 *bytes_read, UT_uint32 *bytes_written) |
ABI_EXPORT char * | UT_convert_cd (const char *str, UT_sint32 len, UT_iconv_t cd, UT_uint32 *bytes_read, UT_uint32 *bytes_written) |
#define UCS_2_INTERNAL ucs2Internal() |
#define UCS_INTERNAL ucs4Internal() |
Referenced by IE_Imp_Hancom::_loadFile(), findConverter(), and UT_Wctomb::UT_Wctomb().
#define UT_ICONV_INVALID ((UT_iconv_t)(-1)) |
typedef void* UT_iconv_t |
G_BEGIN_DECLS ABI_EXPORT const char* ucs2Internal | ( | ) |
References s_internal_init().
ABI_EXPORT const char* ucs4Internal | ( | ) |
References s_internal_init().
Referenced by init_values(), and UT_Wctomb::setOutCharset().
ABI_EXPORT char* UT_convert | ( | const char * | str, | |
UT_sint32 | len, | |||
const char * | from_codeset, | |||
const char * | to_codeset, | |||
UT_uint32 * | bytes_read_arg, | |||
UT_uint32 * | bytes_written_arg | |||
) |
Borrowed from GLib 2.0 and (heavily) modified
str | Pointer to the input string. | |
len | Length of the input string to convert. | |
from_codeset | The "codeset" of the string pointed to by 'str'. | |
to_codeset | The "codeset" we want for the output. | |
bytes_read | optional, supply NULL if you don't want this. | |
bytes_written | optional, supply NULL if you don't want this. |
Referenced by IE_Imp_Hancom::_loadFile(), UT_Win32LocaleString::fromUCS4(), UT_Win32LocaleString::fromUTF8(), AP_UnixApp::pasteFromClipboard(), prepare_style_name(), UT_Win32LocaleString::ucs4_str(), UT_std_stringFromEncoding(), UT_UTF8String::UT_UTF8String(), UT_Win32LocaleString::utf8_str(), and utf8_to_ucs2().
ABI_EXPORT char* UT_convert_cd | ( | const char * | str, | |
UT_sint32 | len, | |||
UT_iconv_t | cd, | |||
UT_uint32 * | bytes_read_arg, | |||
UT_uint32 * | bytes_written_arg | |||
) |
This function is almost the same as the other UT_convert function, only that it takes an UT_iconv_t instead of a from and to codeset. This is useful if you need to do a conversion multiple times
Referenced by IE_Imp_StarOffice::_loadFile(), XAP_StringSet::getValue(), DocHdr::load(), and readByteString().
ABI_EXPORT size_t UT_iconv | ( | UT_iconv_t | cd, | |
const char ** | inbuf, | |||
size_t * | inbytesleft, | |||
char ** | outbuf, | |||
size_t * | outbytesleft | |||
) |
References UT_iconv_isValid().
Referenced by ev_Win32Keyboard::_emitChar(), IE_Exp_RTF::_rtf_chardata(), s_AskForPathname(), s_internal_init(), XAP_EncodingManager::strToNative(), try_CToU(), try_UToC(), UT_iconv_reset(), UT_Wctomb::wctomb(), and XAP_EncodingManager::XAP_XML_UnknownEncodingHandler().
ABI_EXPORT int UT_iconv_close | ( | UT_iconv_t | cd | ) |
References UT_iconv_isValid().
Referenced by IE_Imp_StarOffice::_loadFile(), XAP_StringSet::getValue(), XAP_EncodingManager::initialize(), ev_Win32Keyboard::remapKeyboard(), s_internal_init(), UT_Wctomb::setOutCharset(), XAP_EncodingManager::strToNative(), UT_Encoding::UT_Encoding(), XAP_EncodingManager::XAP_XML_UnknownEncodingHandler(), UT_UCS4_mbtowc::Converter::~Converter(), UT_UCS2_mbtowc::Converter::~Converter(), DocHdr::~DocHdr(), ev_Win32Keyboard::~ev_Win32Keyboard(), IE_Exp_RTF::~IE_Exp_RTF(), UT_Wctomb::~UT_Wctomb(), and XAP_EncodingManager::~XAP_EncodingManager().
ABI_EXPORT int UT_iconv_isValid | ( | UT_iconv_t | cd | ) |
Returns true if the internal handle is valid, false if not
References UT_ICONV_INVALID.
Referenced by IE_Imp_StarOffice::_loadFile(), IE_Exp_RTF::_rtf_chardata(), XAP_EncodingManager::describe(), findConverter(), XAP_StringSet::getValue(), init_values(), DocHdr::load(), SDWDocInfo::load(), UT_UCS4_mbtowc::mbtowc(), UT_UCS2_mbtowc::mbtowc(), s_AskForPathname(), s_internal_init(), XAP_EncodingManager::strToNative(), try_CToU(), try_UToC(), UT_Encoding::UT_Encoding(), UT_iconv(), UT_iconv_close(), UT_Wctomb::UT_Wctomb(), XAP_EncodingManager::XAP_XML_UnknownEncodingHandler(), UT_UCS4_mbtowc::Converter::~Converter(), UT_UCS2_mbtowc::Converter::~Converter(), DocHdr::~DocHdr(), IE_Exp_RTF::~IE_Exp_RTF(), and UT_Wctomb::~UT_Wctomb().
ABI_EXPORT UT_iconv_t UT_iconv_open | ( | const char * | to, | |
const char * | from | |||
) |
Referenced by findConverter(), XAP_StringSet::getValue(), IE_Exp_RTF::IE_Exp_RTF(), init_values(), XAP_EncodingManager::initialize(), ev_Win32Keyboard::remapKeyboard(), s_AskForPathname(), s_internal_init(), UT_Wctomb::setOutCharset(), XAP_EncodingManager::strToNative(), UT_Encoding::UT_Encoding(), UT_Wctomb::UT_Wctomb(), and XAP_EncodingManager::XAP_XML_UnknownEncodingHandler().
ABI_EXPORT void UT_iconv_reset | ( | UT_iconv_t | cd | ) |
References XAP_EncodingManager::get_instance(), and UT_iconv().
Referenced by UT_Wctomb::initialize(), UT_UCS4_mbtowc::Converter::initialize(), UT_UCS2_mbtowc::Converter::initialize(), try_CToU(), and try_UToC().