y2string.cc File Reference

#include <errno.h>
#include "y2log.h"
#include "y2string.h"

Functions

template<class In, class Out>
bool recode_all (iconv_t cd, const In &in, Out *out, const typename Out::value_type errorsign)
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)

Function Documentation

bool recode iconv_t  cd,
const std::wstring &  in,
std::wstring *  out
 

bool recode iconv_t  cd,
const std::wstring &  in,
std::string *  out
 

bool recode iconv_t  cd,
const std::string &  in,
std::wstring *  out
 

bool recode iconv_t  cd,
const std::string &  in,
std::string *  out
 

template<class In, class Out>
bool recode_all iconv_t  cd,
const In &  in,
Out *  out,
const typename Out::value_type  errorsign
 

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.

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.


Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6