1UNICODE::ICONVERT::T(3) Courier Unicode Library UNICODE::ICONVERT::T(3)
2
3
4
6 unicode::iconvert::tou - template for converting text sequence to
7 unicode
8
10 #include <courier-unicode.h>
11
12 output_iter_t convert(input_iter_t beg_iter, input_iter_t end_iter,
13 const std::string &charset, bool &errflag,
14 output_iter_t output_iter);
15
16 bool convert(input_iter_t beg_iter, input_iter_t end_iter,
17 const std::string &charset, std::u32string &out_buf);
18
19 std::pair<std::u32string, bool> convert(const std::string &text,
20 const std::string &charset);
21
23 These template functions convert text in a given character set to
24 unicode characters. beg_iter and end_iter define an input sequence of
25 chars in the charset character set. They get converted to unicode
26 characters. output_iter is an output iterator that convert() iterates
27 over char32_ts. convert() returns the value of the output iterator
28 after iterating over the converted character sequence. errflag, passed
29 by reference, gets set to true if some character could not be converted
30 to unicode, from the specified character set, and false if the
31 conversion completed without errors.
32
33 An overloaded convert() puts the unicode character sequence into a
34 vector of char32_ts, instead of an output sequence, and returned the
35 error flag. Finally, a single std::string specifies the character
36 string, instead of a beginning and an ending iterator, and returns a
37 std::pair with the converted unicode text in a vector, and the error
38 flag.
39
41 courier-unicode(7), unicode::convert::convert(3), unicode_convert(3),
42 iconv(3)[1].
43
45 Sam Varshavchik
46 Author
47
49 1.
50
51 iconv(3)
52 https://manpages.courier-mta.org/htmlman3/iconv.3.html
53
54
55
56Courier Unicode Library 04/16/2022 UNICODE::ICONVERT::T(3)