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 "support/types.h"
22 // A single codepoint conversion for utf8_to_ucs4 does not make
23 // sense, so that function is left out.
25 std::vector<lyx::char_type>
26 utf8_to_ucs4(std::vector<char> const & utf8str);
28 std::vector<lyx::char_type>
29 utf8_to_ucs4(char const * utf8str, size_t ls);
34 ucs2_to_ucs4(unsigned short c);
36 std::vector<lyx::char_type>
37 ucs2_to_ucs4(std::vector<unsigned short> const & ucs2str);
39 std::vector<lyx::char_type>
40 ucs2_to_ucs4(unsigned short const * ucs2str, size_t ls);
45 ucs4_to_ucs2(lyx::char_type c);
47 std::vector<unsigned short>
48 ucs4_to_ucs2(std::vector<lyx::char_type> const & ucs4str);
50 std::vector<unsigned short>
51 ucs4_to_ucs2(lyx::char_type const * s, size_t ls);
56 ucs4_to_utf8(lyx::char_type c);
59 ucs4_to_utf8(std::vector<lyx::char_type> const & ucs4str);
62 ucs4_to_utf8(lyx::char_type const * ucs4str, size_t ls);
64 extern char const * ucs4_codeset;
65 extern char const * ucs2_codeset;