/usr/include/boost/locale
NameSizeModeActions
boundary/-0755rm
boundary.hpp5970644editdlrm
collator.hpp85940644editdlrm
config.hpp10490644editdlrm
conversion.hpp154040644editdlrm
date_time.hpp472980644editdlrm
date_time_facet.hpp110170644editdlrm
definitions.hpp8580644editdlrm
encoding.hpp97900644editdlrm
encoding_errors.hpp20530644editdlrm
encoding_utf.hpp28380644editdlrm
format.hpp183100644editdlrm
formatting.hpp214870644editdlrm
generator.hpp95650644editdlrm
generic_codecvt.hpp246090644editdlrm
gnu_gettext.hpp63170644editdlrm
hold_ptr.hpp24830644editdlrm
info.hpp35800644editdlrm
localization_backend.hpp67950644editdlrm
message.hpp282970644editdlrm
time_zone.hpp12800644editdlrm
utf.hpp133890644editdlrm
utf8_codecvt.hpp18250644editdlrm
util.hpp129630644editdlrm
Edit: /usr/include/boost/locale/utf8_codecvt.hpp (1825B)
// // Copyright (c) 2015 Artyom Beilis (Tonkikh) // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_LOCALE_UTF8_CODECVT_HPP #define BOOST_LOCALE_UTF8_CODECVT_HPP #include #include #include #include namespace boost { namespace locale { /// /// \brief Geneneric utf8 codecvt facet, it allows to convert UTF-8 strings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t /// template class utf8_codecvt : public generic_codecvt > { public: struct state_type {}; utf8_codecvt(size_t refs = 0) : generic_codecvt >(refs) { } static int max_encoding_length() { return 4; } static state_type initial_state(generic_codecvt_base::initial_convertion_state /* unused */) { return state_type(); } static utf::code_point to_unicode(state_type &,char const *&begin,char const *end) { char const *p=begin; utf::code_point c = utf::utf_traits::decode(p,end); if(c!=utf::illegal && c!=utf::incomplete) begin = p; return c; } static utf::code_point from_unicode(state_type &,utf::code_point u,char *begin,char const *end) { if(!utf::is_valid_codepoint(u)) return utf::illegal; int width; if((width=utf::utf_traits::width(u)) > end - begin) return utf::incomplete; utf::utf_traits::encode(u,begin); return width; } }; } // locale } // namespace boost #endif /// // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4