8 #ifndef BOOSTER_LOCALE_UTIL_HPP
9 #define BOOSTER_LOCALE_UTIL_HPP
12 #include <booster/cstdint.h>
13 #include <booster/locale/utf.h>
14 #include <booster/locale/generator.h>
15 #include <booster/assert.h>
60 std::locale
create_info(std::locale
const &in,std::string
const &name);
85 static const uint32_t
illegal=utf::illegal;
141 virtual uint32_t
to_unicode(
char const *&begin,
char const *end)
145 unsigned char cp = *begin;
170 *begin =
static_cast<char>(u);
BOOSTER_API std::locale create_info(std::locale const &in, std::string const &name)
Installs information facet to locale in based on locale name name.
This class represent a simple stateless converter from UCS-4 and to UCS-4 for each single code point...
Definition: util.h:77
BOOSTER_API std::auto_ptr< base_converter > create_utf8_converter()
uint32_t character_facet_type
type that specifies the character type that locales can be generated for
Definition: generator.h:43
BOOSTER_API std::locale create_codecvt(std::locale const &in, std::auto_ptr< base_converter > cvt, character_facet_type type)
BOOSTER_API std::string get_system_locale(bool use_utf8_on_windows=false)
Return default system locale name in POSIX format.
virtual uint32_t to_unicode(char const *&begin, char const *end)
Definition: util.h:141
virtual base_converter * clone() const
Definition: util.h:120
static const uint32_t incomplete
Definition: util.h:91
virtual uint32_t from_unicode(uint32_t u, char *begin, char const *end)
Definition: util.h:164
static const uint32_t illegal
Definition: util.h:85
BOOSTER_API std::auto_ptr< base_converter > create_simple_converter(std::string const &encoding)
virtual bool is_thread_safe() const
Definition: util.h:113
virtual int max_len() const
Definition: util.h:100