7 #ifndef BOOST_LOCALE_UTF8_CODECVT_HPP 8 #define BOOST_LOCALE_UTF8_CODECVT_HPP 10 #include <boost/locale/generic_codecvt.hpp> 11 #include <boost/locale/utf.hpp> 12 #include <boost/cstdint.hpp> 15 namespace boost {
namespace locale {
19 template<
typename CharType>
26 static int max_encoding_length() {
return 4; }
32 static utf::code_point to_unicode(state_type&,
const char*& begin,
const char* end)
34 const char* p = begin;
static code_point decode(Iterator &p, Iterator e)
bool is_valid_codepoint(code_point v)
the function checks if v is a valid code point
Definition: utf.hpp:27
static Iterator encode(code_point value, Iterator out)
Geneneric utf8 codecvt facet, it allows to convert UTF-8 strings to UTF-16 and UTF-32 using wchar_t,...
Definition: utf8_codecvt.hpp:20
uint32_t code_point
The integral type that can hold a Unicode code point.
Definition: utf.hpp:19
initial_convertion_state
Initial state for converting to or from unicode code points, used by initial_state in derived classes...
Definition: generic_codecvt.hpp:33
static int width(code_point value)
Definition: utf8_codecvt.hpp:22
Generic codecvt facet for various stateless encodings to UTF-16 and UTF-32 using wchar_t,...
Definition: generic_codecvt.hpp:143
constexpr code_point illegal
Special constant that defines illegal code point.
Definition: utf.hpp:22
constexpr code_point incomplete
Special constant that defines incomplete code point.
Definition: utf.hpp:24