File: unicode%3A%3Aiconvert%3A%3Aconvert.3

package info (click to toggle)
courier-unicode 2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,320 kB
  • sloc: ansic: 39,403; sh: 4,166; cpp: 735; perl: 390; makefile: 335
file content (127 lines) | stat: -rw-r--r-- 4,085 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
'\" t
.\"     Title: unicode::iconvert::convert
.\"    Author: Sam Varshavchik
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 03/11/2017
.\"    Manual: Courier Unicode Library
.\"    Source: Courier Unicode Library
.\"  Language: English
.\"
.TH "UNICODE::ICONVERT::C" "3" "03/11/2017" "Courier Unicode Library" "Courier Unicode Library"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
unicode::iconvert::convert, unicode::ucs_4, unicode::ucs_2, unicode::utf_8, unicode::iso_8859_1 \- unicode character set conversion
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <courier\-unicode\&.h>

extern const char unicode::ucs_4[];
extern const char unicode::ucs_2[];
extern const char unicode::utf_8[];
extern const char unicode::iso_8859_1[];
.fi
.ft
.HP \w'std::string\ unicode::iconvert::convert('u
.BI "std::string unicode::iconvert::convert(const\ std::string\ &" "text" ", const\ std::string\ &" "srccharset" ", const\ std::string\ &" "dstcharset" ");"
.HP \w'std::string\ unicode::iconvert::convert('u
.BI "std::string unicode::iconvert::convert(const\ std::string\ &" "text" ", const\ std::string\ &" "srccharset" ", const\ std::string\ &" "dstcharset" ", bool\ &" "errflag" ");"
.HP 8
.BI "std::string unicode::iconvert::convert( const\ std::vector<char32_t>\ &" "text" ", const\ std::string\ &" "dstcharset" ");"
.HP 8
.BI "std::string unicode::iconvert::convert( const\ std::vector<char32_t>\ &" "text" ", const\ std::string\ &" "dstcharset" ", bool\ &" "errflag" ");"
.HP \w'bool\ unicode::iconvert::convert('u
.BI "bool unicode::iconvert::convert(const\ std::string\ &" "text" ", const\ std::string\ &" "charset" ", std::vector<char32_t>\ &" "text" ");"
.SH "DESCRIPTION"
.PP
The overloaded
\fBunicode::convert::convert\fR() functions convert:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
A text string between two different character sets, returning the new string\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
A vector of unicode characters (not null\-terminated) to a character string in a supported character set\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Initialize a vector of unicode characters, passed by reference, by converting a text string in a given character set to unicode\&.
.RE
.PP
These functions use
\fBiconv\fR(3), and can use any character set that\*(Aqs supported by
\fBiconv\fR(3)\&. Use
\fIunicode::ucs_2\fR
and
\fIunicode::ucs_4\fR
to specify the 16 and the 32 bit unicode octet in native byte order\&. Use
\fIunicode::utf_8\fR
and
\fIunicode::iso_8859_1\fR
to specify these two standard character sets\&. The overloaded versions that pass a reference to a
bool
set the flag to
true
if some characters could not be converted\&. The overloaded version that initializes a unicode vector returns the
bool
flag, instead\&.
.SH "SEE ALSO"
.PP
\fBcourier-unicode\fR(7),
\fBunicode::convert::convert_tocase\fR(3),
\fBunicode_convert\fR(3),
\m[blue]\fB\fBiconv\fR(3)\fR\m[]\&\s-2\u[1]\d\s+2\&.
.SH "AUTHOR"
.PP
\fBSam Varshavchik\fR
.RS 4
Author
.RE
.SH "NOTES"
.IP " 1." 4

	      \fBiconv\fR(3)
.RS 4
\%http://manpages.courier-mta.org/htmlman3/iconv.3.html
.RE