1UNICODE::ICONVERT::C(3) Courier Unicode Library UNICODE::ICONVERT::C(3)
2
3
4
6 unicode::iconvert::convert, unicode::ucs_4, unicode::ucs_2,
7 unicode::utf_8, unicode::iso_8859_1 - unicode character set conversion
8
10 #include <courier-unicode.h>
11
12 extern const char unicode::ucs_4[];
13 extern const char unicode::ucs_2[];
14 extern const char unicode::utf_8[];
15 extern const char unicode::iso_8859_1[];
16
17 std::string unicode::iconvert::convert(const std::string &text,
18 const std::string &srccharset,
19 const std::string &dstcharset);
20
21 std::string unicode::iconvert::convert(const std::string &text,
22 const std::string &srccharset,
23 const std::string &dstcharset,
24 bool &errflag);
25
26 std::string
27 unicode::iconvert::convert(const std::vector<char32_t> &text,
28 const std::string &dstcharset);
29
30 std::string
31 unicode::iconvert::convert(const std::vector<char32_t> &text,
32 const std::string &dstcharset,
33 bool &errflag);
34
35 bool unicode::iconvert::convert(const std::string &text,
36 const std::string &charset,
37 std::vector<char32_t> &text);
38
40 The overloaded unicode::convert::convert() functions convert:
41
42 · A text string between two different character sets, returning the
43 new string.
44
45 · A vector of unicode characters (not null-terminated) to a character
46 string in a supported character set.
47
48 · Initialize a vector of unicode characters, passed by reference, by
49 converting a text string in a given character set to unicode.
50
51 These functions use iconv(3), and can use any character set that's
52 supported by iconv(3). Use unicode::ucs_2 and unicode::ucs_4 to specify
53 the 16 and the 32 bit unicode octet in native byte order. Use
54 unicode::utf_8 and unicode::iso_8859_1 to specify these two standard
55 character sets. The overloaded versions that pass a reference to a bool
56 set the flag to true if some characters could not be converted. The
57 overloaded version that initializes a unicode vector returns the bool
58 flag, instead.
59
61 courier-unicode(7), unicode::convert::convert_tocase(3),
62 unicode_convert(3), iconv(3)[1].
63
65 Sam Varshavchik
66 Author
67
69 1.
70
71 iconv(3)
72 http://manpages.courier-mta.org/htmlman3/iconv.3.html
73
74
75
76Courier Unicode Library 03/11/2017 UNICODE::ICONVERT::C(3)