'\" t
.\" Title: unicode::iconvert::convert
.\" Author: Sam Varshavchik
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" 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
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\ &" "text" ", const\ std::string\ &" "dstcharset" ");"
.HP 8
.BI "std::string unicode::iconvert::convert( const\ std::vector\ &" "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\ &" "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