#include <iconv.h>
#include <string>
Go to the source code of this file.
Functions | |
bool | recode (iconv_t cd, const std::string &in, std::string *out) |
bool | recode (iconv_t cd, const std::string &in, std::wstring *out) |
bool | recode (iconv_t cd, const std::wstring &in, std::string *out) |
bool | recode (iconv_t cd, const std::wstring &in, std::wstring *out) |
bool | utf82wchar (const std::string &in, std::wstring *out) |
bool | wchar2utf8 (const std::wstring &in, std::string *out) |
bool recode | ( | iconv_t | cd, | |
const std::wstring & | in, | |||
std::wstring * | out | |||
) |
References recode_all().
bool recode | ( | iconv_t | cd, | |
const std::wstring & | in, | |||
std::string * | out | |||
) |
References recode_all().
bool recode | ( | iconv_t | cd, | |
const std::string & | in, | |||
std::wstring * | out | |||
) |
References recode_all().
bool recode | ( | iconv_t | cd, | |
const std::string & | in, | |||
std::string * | out | |||
) |
References recode_all().
Referenced by utf82wchar(), and wchar2utf8().
bool utf82wchar | ( | const std::string & | in, | |
std::wstring * | out | |||
) |
Convert a UTF-8 encoded string into a wide character string. Illegal input sequences are replaces by question marks.
Return false if no conversion was possible due to some general error. It does not return false if the input only contains illegal sequences.
The special feature of this function is that it does not depend on the current locale.
References recode(), and y2error.
Referenced by YCPStringRep::compare(), s_lsubstring1(), s_lsubstring2(), and s_size().
bool wchar2utf8 | ( | const std::wstring & | in, | |
std::string * | out | |||
) |
Convert a wide character string into a UTF-8 encoded string. Illegal input sequences are replaces by question marks.
Return false if no conversion was possible due to some general error. It does not return false if the input only contains illegal sequences.
The special feature of this function is that it does not depend on the current locale.
References recode(), and y2error.
Referenced by s_lsubstring1(), and s_lsubstring2().