Boost.Locale
Codepage

Classes

class  boost::locale::conv::conversion_error
 The exception that is thrown in case of conversion error. More...
 
class  boost::locale::conv::invalid_charset_error
 This exception is thrown in case of use of unsupported or invalid character set. More...
 

Enumerations

enum  boost::locale::conv::method_type { boost::locale::conv::skip = 0 , boost::locale::conv::stop = 1 , boost::locale::conv::default_method = skip }
 enum that defines conversion policy More...
 

Functions

template<typename CharOut , typename CharIn , class Alloc = std::allocator<CharOut>>
std::basic_string< CharOut, std::char_traits< CharOut >, Alloc > boost::locale::conv::utf_to_utf (const CharIn *begin, const CharIn *end, method_type how=default_method, const Alloc &alloc=Alloc())
 
template<typename CharOut , typename CharIn , class Alloc >
std::basic_string< CharOut, std::char_traits< CharOut >, Alloc > boost::locale::conv::utf_to_utf (const CharIn *begin, const CharIn *end, const Alloc &alloc)
 
template<typename CharOut , typename CharIn , class Alloc = std::allocator<CharOut>>
std::basic_string< CharOut, std::char_traits< CharOut >, Alloc > boost::locale::conv::utf_to_utf (const CharIn *str, method_type how=default_method, const Alloc &alloc=Alloc())
 
template<typename CharOut , typename CharIn , class Alloc >
std::basic_string< CharOut, std::char_traits< CharOut >, Alloc > boost::locale::conv::utf_to_utf (const CharIn *str, const Alloc &alloc)
 
template<typename CharOut , typename CharIn , class Alloc >
std::basic_string< CharOut, std::char_traits< CharOut >, detail::rebind_alloc< Alloc, CharOut > > boost::locale::conv::utf_to_utf (const std::basic_string< CharIn, std::char_traits< CharIn >, Alloc > &str, method_type how=default_method)
 
template<typename CharOut , typename CharIn , class AllocOut , class AllocIn >
std::basic_string< CharOut, std::char_traits< CharOut >, AllocOut > boost::locale::conv::utf_to_utf (const std::basic_string< CharIn, std::char_traits< CharIn >, AllocIn > &str, method_type how=default_method, const AllocOut &alloc=AllocOut())
 
template<typename CharOut , typename CharIn , class AllocOut , class AllocIn >
std::basic_string< CharOut, std::char_traits< CharOut >, AllocOut > boost::locale::conv::utf_to_utf (const std::basic_string< CharIn, std::char_traits< CharIn >, AllocIn > &str, const AllocOut &alloc)
 

Detailed Description

Enumeration Type Documentation

◆ method_type

enum that defines conversion policy

Enumerator
skip 

Skip illegal/unconvertible characters.

stop 

Stop conversion and throw conversion_error.

default_method 

Default method - skip.

Function Documentation

◆ utf_to_utf() [1/7]

template<typename CharOut , typename CharIn , class Alloc >
std::basic_string< CharOut, std::char_traits< CharOut >, Alloc > boost::locale::conv::utf_to_utf ( const CharIn *  begin,
const CharIn *  end,
const Alloc &  alloc 
)

Convert a Unicode string str to other Unicode encoding. Invalid characters are skipped.

◆ utf_to_utf() [2/7]

template<typename CharOut , typename CharIn , class Alloc = std::allocator<CharOut>>
std::basic_string< CharOut, std::char_traits< CharOut >, Alloc > boost::locale::conv::utf_to_utf ( const CharIn *  begin,
const CharIn *  end,
method_type  how = default_method,
const Alloc &  alloc = Alloc() 
)

Convert a Unicode text in range [begin,end) to other Unicode encoding

Exceptions
conversion_errorConversion failed (e.g. how is stop and any character cannot be decoded)

◆ utf_to_utf() [3/7]

template<typename CharOut , typename CharIn , class Alloc >
std::basic_string< CharOut, std::char_traits< CharOut >, Alloc > boost::locale::conv::utf_to_utf ( const CharIn *  str,
const Alloc &  alloc 
)

Convert a Unicode string str to other Unicode encoding. Invalid characters are skipped.

◆ utf_to_utf() [4/7]

template<typename CharOut , typename CharIn , class Alloc = std::allocator<CharOut>>
std::basic_string< CharOut, std::char_traits< CharOut >, Alloc > boost::locale::conv::utf_to_utf ( const CharIn *  str,
method_type  how = default_method,
const Alloc &  alloc = Alloc() 
)

Convert a Unicode NULL terminated string str to other Unicode encoding

Exceptions
conversion_errorConversion failed (e.g. how is stop and any character cannot be decoded)

◆ utf_to_utf() [5/7]

template<typename CharOut , typename CharIn , class Alloc >
std::basic_string< CharOut, std::char_traits< CharOut >, detail::rebind_alloc< Alloc, CharOut > > boost::locale::conv::utf_to_utf ( const std::basic_string< CharIn, std::char_traits< CharIn >, Alloc > &  str,
method_type  how = default_method 
)

Convert a Unicode string str to other Unicode encoding

Exceptions
conversion_errorConversion failed (e.g. how is stop and any character cannot be decoded)

◆ utf_to_utf() [6/7]

template<typename CharOut , typename CharIn , class AllocOut , class AllocIn >
std::basic_string< CharOut, std::char_traits< CharOut >, AllocOut > boost::locale::conv::utf_to_utf ( const std::basic_string< CharIn, std::char_traits< CharIn >, AllocIn > &  str,
const AllocOut &  alloc 
)

Convert a Unicode string str to other Unicode encoding. Invalid characters are skipped.

◆ utf_to_utf() [7/7]

template<typename CharOut , typename CharIn , class AllocOut , class AllocIn >
std::basic_string< CharOut, std::char_traits< CharOut >, AllocOut > boost::locale::conv::utf_to_utf ( const std::basic_string< CharIn, std::char_traits< CharIn >, AllocIn > &  str,
method_type  how = default_method,
const AllocOut &  alloc = AllocOut() 
)

Convert a Unicode string str to other Unicode encoding

Exceptions
conversion_errorConversion failed (e.g. how is stop and any character cannot be decoded)