Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
UNICODE::ICONVERT::C(3)      Courier Unicode Library	 UNICODE::ICONVERT::C(3)

NAME
     unicode::iconvert::convert, unicode::ucs_4, unicode::ucs_2, unicode::utf_8,
     unicode::iso_8859_1 - unicode character set conversion

SYNOPSIS
     #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[];

     std::string	unicode::iconvert::convert(const std::string_view &text,
					    const std::string &srccharset,
					    const std::string &dstcharset);

     std::string	unicode::iconvert::convert(const std::string_view &text,
					    const std::string &srccharset,
					    const std::string &dstcharset,
					    bool &errflag);

     std::string     unicode::iconvert::convert(const std::u32string_view &text,
					    const std::string &dstcharset);

     std::string     unicode::iconvert::convert(const std::u32string_view &text,
					    const std::string &dstcharset,
					    bool &errflag);

     bool		unicode::iconvert::convert(const std::string_view &text,
				     const std::string &charset,
				     std::u32string &text);

DESCRIPTION
     The overloaded unicode::convert::convert() functions convert:

     *	 A text string between two supported character sets, returning	the  new
	 string.

     *	 A Unicode string to a character string in a supported character set.

     *	 Initialize  a Unicode string, passed by reference, by converting a text
	 string in a given character set to unicode.

     These functions use iconv(3), and can use any  character  set  that's  sup-
     ported by iconv(3). Use unicode::ucs_2 and unicode::ucs_4 to specify the 16
     and  the  32 bit unicode octet in native byte order. Use unicode::utf_8 and
     unicode::iso_8859_1 to specify these two standard character sets. The over-
     loaded versions that pass a reference to a bool set the  flag  to	true  if
     some  characters  could  not be converted. The overloaded version that ini-
     tializes a unicode vector returns the bool flag, instead.

SEE ALSO
     courier-unicode(7),    unicode::convert::convert_tocase(3),    unicode_con-
     vert(3), iconv(3).

AUTHOR
     Sam Varshavchik
	 Author

Courier Unicode Library 	   04/12/2026		 UNICODE::ICONVERT::C(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=unicode::iconvert::convert&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help