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

FreeBSD Manual Pages

  
 
  

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

NAME
     unicode::iconvert::tou - template for converting text sequence to unicode

SYNOPSIS
     #include <courier-unicode.h>

     auto	   convert(beg_iter_t &&beg_iter,	  end_iter_t &&end_iter,
		  const std::string &charset,	     bool &errflag,	    out-
		  put_iter_t &&output_iter);

     bool	   convert(input_iter_t beg_iter,	  input_iter_t end_iter,
		  const std::string &charset, std::u32string &out_buf);

     std::pair<std::u32string,	  bool>    convert(const std::string_view &text,
					     const std::string &charset);

DESCRIPTION
     These  template  functions convert text in a given character set to unicode
     characters.  beg_iter and end_iter define an input sequence of chars in the
     charset character set. They get  converted  to  unicode  characters.   out-
     put_iter is an output iterator that convert() iterates over char32_ts:

     If  output_iter  is  an lvalue, convert()'s parameter is a reference to the
     output iterator which gets updated in place and convert() returns void.  If
     output_iter is an rvalue convert() returns the value of the output iterator
     after  iterating over the converted character sequence.  errflag, passed by
     reference, gets set to true if some character could  not  be  converted  to
     unicode, from the specified character set, and false if the conversion com-
     pleted without errors.

     An  overloaded  convert() puts the unicode character sequence into a vector
     of char32_ts, instead of an output sequence, and returned the  error  flag.
     Finally,  a single std::string specifies the character string, instead of a
     beginning and an ending iterator, and returns a  std::pair  with  the  con-
     verted unicode text in a vector, and the error flag.

SEE ALSO
     courier-unicode(7),    unicode::convert::convert(3),    unicode_convert(3),
     iconv(3).

AUTHOR
     Sam Varshavchik
	 Author

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

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

home | help