3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
10 * A collection of unicode conversion functions, using iconv.
13 #ifndef LYX_SUPPORT_UNICODE_H
14 #define LYX_SUPPORT_UNICODE_H
16 #include <boost/cstdint.hpp>
21 // A single codepoint conversion for utf8_to_ucs4 does not make
22 // sense, so that function is left out.
24 std::vector<boost::uint32_t>
25 utf8_to_ucs4(std::vector<char> const & utf8str);
27 std::vector<boost::uint32_t>
28 utf8_to_ucs4(char const * utf8str, size_t ls);
33 ucs2_to_ucs4(unsigned short c);
35 std::vector<boost::uint32_t>
36 ucs2_to_ucs4(std::vector<unsigned short> const & ucs2str);
38 std::vector<boost::uint32_t>
39 ucs2_to_ucs4(unsigned short const * ucs2str, size_t ls);
44 ucs4_to_ucs2(boost::uint32_t c);
46 std::vector<unsigned short>
47 ucs4_to_ucs2(std::vector<boost::uint32_t> const & ucs4str);
49 std::vector<unsigned short>
50 ucs4_to_ucs2(boost::uint32_t const * s, size_t ls);
55 ucs4_to_utf8(boost::uint32_t c);
58 ucs4_to_utf8(std::vector<boost::uint32_t> const & ucs4str);
61 ucs4_to_utf8(boost::uint32_t const * ucs4str, size_t ls);