From 4772eca04a83b089d2fb5ce3ede22f0e274b7c80 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Wed, 18 Jun 2003 18:19:47 +0000 Subject: [PATCH] Move manual to doc/. --- Makefile.am | 26 +- configure.ac | 2 +- doc/.cvsignore | 31 +++ doc/Makefile.am | 39 +++ fdl.texi => doc/fdl.texi | 0 lgpl.texi => doc/lgpl.texi | 0 libidn.texi => doc/libidn.texi | 611 ++++++++++++++++++++++++++++++++++++++++- 7 files changed, 680 insertions(+), 29 deletions(-) create mode 100644 doc/.cvsignore create mode 100644 doc/Makefile.am rename fdl.texi => doc/fdl.texi (100%) rename lgpl.texi => doc/lgpl.texi (100%) rename libidn.texi => doc/libidn.texi (52%) diff --git a/Makefile.am b/Makefile.am index ca777af..26cac98 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,8 +17,8 @@ # License along with GNU Libidn; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -DIST_SUBDIRS = reference -SUBDIRS = @GTKDOC@ +DIST_SUBDIRS = doc reference +SUBDIRS = doc @GTKDOC@ ACLOCAL_AMFLAGS = -I m4 @@ -28,7 +28,6 @@ EXTRA_DIST = FAQ libidn.pc.in \ gen-unicode-tables.pl UnicodeData-3.2.0.txt LineBreak-3.2.0.txt \ SpecialCasing-3.2.0.txt CaseFolding-3.2.0.txt \ CompositionExclusions-3.2.0.txt \ - libidn.html libidn.ps libidn.pdf lgpl.texi \ libc/README libc/Makefile libc/Versions libc/configure \ libc/example.c libc/getaddrinfo.c libc/libc.patch libc/netdb.h \ contrib/README contrib/idn-python/README contrib/idn-python/Makefile \ @@ -84,12 +83,6 @@ idn.c: idn_cmd.c idn_cmd.h idn_cmd.c idn_cmd.h: idn.ggo -gengetopt --input $^ --file-name idn_cmd -dist_man_MANS = idn.1 - -idn.1: idn.c - $(HELP2MAN) --name="Internationalized Domain Names command line tool" \ - --output=$@ $(top_builddir)/idn - # Test suite tests = tst_stringprep tst_punycode tst_idna tst_nfkc \ @@ -110,21 +103,6 @@ dist_lisp_LISP = punycode.el idna.el ELCFILES= elc-stamp: -# Documentation - -info_TEXINFOS = libidn.texi -pdf_TEXINFOS = libidn.texi -ps_TEXINFOS = libidn.texi - -libidn.html: libidn.texi - $(MAKEINFO) --html --no-split --number-sections $^ - -libidn_TEXINFOS = fdl.texi \ - example.c.texi example2.c.texi example3.c.texi example4.c.texi - -%.c.texi: %.c - sed -e 's/{/@{/g' -e 's/}/@}/g' < $< > $@ - # Maintainer targets ChangeLog: diff --git a/configure.ac b/configure.ac index 285d2f7..bf4e9ac 100644 --- a/configure.ac +++ b/configure.ac @@ -101,5 +101,5 @@ AM_MISSING_PROG(GTKDOC_MKHTML, gtkdoc-mkhtml, $missing_dir) AM_MISSING_PROG(GTKDOC_FIXXREF, gtkdoc-fixxref, $missing_dir) AC_CONFIG_FILES([Makefile libidn.pc stringprep.h reference/Makefile idn.ggo \ - contrib/doxygen/Doxyfile]) + contrib/doxygen/Doxyfile doc/Makefile]) AC_OUTPUT diff --git a/doc/.cvsignore b/doc/.cvsignore new file mode 100644 index 0000000..670aa86 --- /dev/null +++ b/doc/.cvsignore @@ -0,0 +1,31 @@ +Makefile +Makefile.in +example.c.texi +example2.c.texi +example3.c.texi +example4.c.texi +idn.1 +libidn.aux +libidn.cp +libidn.cps +libidn.dvi +libidn.fn +libidn.fns +libidn.html +libidn.info* +libidn.ky +libidn.la +libidn.log +libidn.pc +libidn.pdf +libidn.pg +libidn.ps +libidn.toc +libidn.tp +libidn.txt +libidn.vr +libidn.vrs +mdate-sh +stamp-* +texinfo.tex +version.texi diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..c95cb4b --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,39 @@ +## Process this file with automake to produce Makefile.in +# Copyright (C) 2002, 2003 Simon Josefsson. +# +# This file is part of GNU Libidn. +# +# GNU Libidn is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# GNU Libidn is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with GNU Libidn; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +EXTRA_DIST = FAQ libidn.html libidn.ps libidn.pdf lgpl.texi + +dist_man_MANS = idn.1 + +idn.1: ../idn.c + $(HELP2MAN) --name="Internationalized Domain Names command line tool" \ + --output=$@ $(top_builddir)/idn + +info_TEXINFOS = libidn.texi +pdf_TEXINFOS = libidn.texi +ps_TEXINFOS = libidn.texi + +libidn.html: libidn.texi + $(MAKEINFO) --html --no-split --number-sections $^ + +libidn_TEXINFOS = fdl.texi \ + example.c.texi example2.c.texi example3.c.texi example4.c.texi + +%.c.texi: ../%.c + sed -e 's/{/@{/g' -e 's/}/@}/g' < $< > $@ diff --git a/fdl.texi b/doc/fdl.texi similarity index 100% rename from fdl.texi rename to doc/fdl.texi diff --git a/lgpl.texi b/doc/lgpl.texi similarity index 100% rename from lgpl.texi rename to doc/lgpl.texi diff --git a/libidn.texi b/doc/libidn.texi similarity index 52% rename from libidn.texi rename to doc/libidn.texi index 15b26ef..2264c21 100644 --- a/libidn.texi +++ b/doc/libidn.texi @@ -413,7 +413,21 @@ compatibility new features may have been introduced but due to problem with the dynamic linker an old version is actually used. So you may want to check that the version is okay right after program startup. -@include libidn-api-version.texi +@deftypefun {const char *} stringprep_check_version (const char * @var{req_version}) + +@var{req_version}: Required version number, or NULL. + +Check that the the version of the library is at minimum the requested one +and return the version string; return NULL if the condition is not +satisfied. If a NULL is passed to this function, no check is done, +but the version string is simply returned. + +See @var{STRINGPREP_VERSION} for a suitable @code{req_version} string. + + Version string of run-time library, or NULL if the +run-time library does not meet the required version number. + +@end deftypefun The normal way to use the function is to put something similar to the following first in your @code{main()}: @@ -504,7 +518,295 @@ STRINGPREP_NO_UNASSIGNED causes stringprep() abort with an error if string contains unassigned characters according to profile. @end defcv -@include libidn-api-stringprep.texi +@deftypefun {int} stringprep (char * @var{in}, size_t @var{maxlen}, int @var{flags}, Stringprep_profile * @var{profile}) + +@var{in}: input/ouput array with string to prepare. + +@var{maxlen}: maximum length of input/output array. + +@var{flags}: optional stringprep profile flags. + +@var{profile}: pointer to stringprep profile to use. + +Prepare the input UTF-8 string according to the stringprep profile. +Normally application programmers use stringprep profile macros such +as @code{stringprep_nameprep()}, @code{stringprep_kerberos5()} etc instead of +calling this function directly. + +Since the stringprep operation can expand the string, @code{maxlen} +indicate how large the buffer holding the string is. The @code{flags} +are one of Stringprep_profile_flags, or 0. The profile indicates +processing details, see the profile header files, such as +stringprep_generic.h and stringprep_nameprep.h for two examples. +Your application can define new profiles, possibly re-using the +generic stringprep tables that always will be part of the library. +Note that you must convert strings entered in the systems locale +into UTF-8 before using this function. + + Returns 0 iff successful, or an error code. + +@end deftypefun + +@deftypefun {int} stringprep_profile (char * @var{in}, char ** @var{out}, char * @var{profile}, int @var{flags}) + +@var{in}: input/ouput array with string to prepare. + +@var{out}: output variable with newly allocate string. + +@var{profile}: name of stringprep profile to use. + +@var{flags}: optional stringprep profile flags. + +Prepare the input UTF-8 string according to the stringprep profile. +Normally application programmers use stringprep profile macros such +as @code{stringprep_nameprep()}, @code{stringprep_kerberos5()} etc instead of +calling this function directly. + +Note that you must convert strings entered in the systems locale +into UTF-8 before using this function. + +The output @code{out} variable must be deallocated by the caller. + + Returns 0 iff successful, or an error code. + +@end deftypefun + +@deftypefun {uint32_t} stringprep_utf8_to_unichar (const char * @var{p}) + +@var{p}: a pointer to Unicode character encoded as UTF-8 + +Converts a sequence of bytes encoded as UTF-8 to a Unicode character. +If @code{p} does not point to a valid UTF-8 encoded character, results are +undefined. + + the resulting character + +@end deftypefun + +@deftypefun {int} stringprep_unichar_to_utf8 (uint32_t @var{c}, char * @var{outbuf}) + +@var{c}: a ISO10646 character code + +@var{outbuf}: output buffer, must have at least 6 bytes of space. +If @var{NULL}, the length will be computed and returned +and nothing will be written to @code{outbuf}. + +Converts a single character to UTF-8. + + number of bytes written + +@end deftypefun + +@deftypefun {uint32_t *} stringprep_utf8_to_ucs4 (const char * @var{str}, ssize_t @var{len}, size_t * @var{items_written}) + +@var{str}: a UTF-8 encoded string + +@var{len}: the maximum length of @code{str} to use. If @code{len} < 0, then +the string is nul-terminated. + +@var{items_written}: location to store the number of characters in the +result, or @var{NULL}. + +Convert a string from UTF-8 to a 32-bit fixed width +representation as UCS-4, assuming valid UTF-8 input. +This function does no error checking on the input. + + a pointer to a newly allocated UCS-4 string. +This value must be freed with @code{free()}. + +@end deftypefun + +@deftypefun {char *} stringprep_ucs4_to_utf8 (const uint32_t * @var{str}, ssize_t @var{len}, size_t * @var{items_read}, size_t * @var{items_written}) + +@var{str}: a UCS-4 encoded string + +@var{len}: the maximum length of @code{str} to use. If @code{len} < 0, then +the string is terminated with a 0 character. + +@var{items_read}: location to store number of characters read read, or @var{NULL}. + +@var{items_written}: location to store number of bytes written or @var{NULL}. +The value here stored does not include the trailing 0 +byte. + +Convert a string from a 32-bit fixed width representation as UCS-4. +to UTF-8. The result will be terminated with a 0 byte. + + a pointer to a newly allocated UTF-8 string. +This value must be freed with @code{free()}. If an +error occurs, @var{NULL} will be returned and +@code{error} set. + +@end deftypefun + +@deftypefun {char *} stringprep_utf8_nfkc_normalize (const char * @var{str}, ssize_t @var{len}) + +@var{str}: a UTF-8 encoded string. + +@var{len}: length of @code{str}, in bytes, or -1 if @code{str} is nul-terminated. + +Converts a string into canonical form, standardizing +such issues as whether a character with an accent +is represented as a base character and combining +accent or as a single precomposed character. You +should generally call @code{g_utf8_normalize()} before +comparing two Unicode strings. + +The normalization mode is NFKC (ALL COMPOSE). It standardizes +differences that do not affect the text content, such as the +above-mentioned accent representation. It standardizes the +"compatibility" characters in Unicode, such as SUPERSCRIPT THREE to +the standard forms (in this case DIGIT THREE). Formatting +information may be lost but for most text operations such +characters should be considered the same. It returns a result with +composed forms rather than a maximally decomposed form. + + a newly allocated string, that is the +NFKC normalized form of @code{str}. + +@end deftypefun + +@deftypefun {uint32_t *} stringprep_ucs4_nfkc_normalize (uint32_t * @var{str}, ssize_t @var{len}) + +@var{str}: a Unicode string. + +@var{len}: length of @code{str} array, or -1 if @code{str} is nul-terminated. + +Converts UCS4 string into UTF-8 and runs +@code{stringprep_utf8_nfkc_normalize()}. + + a newly allocated Unicode string, that is the NFKC +normalized form of @code{str}. + +@end deftypefun + +@deftypefun {const char *} stringprep_locale_charset ( @var{void}) + + + Return the character set used by the system locale. +It will never return NULL, but use "ASCII" as a fallback. + +@end deftypefun + +@deftypefun {char *} stringprep_convert (const char * @var{str}, const char * @var{to_codeset}, const char * @var{from_codeset}) + +@var{str}: input zero-terminated string. + +@var{to_codeset}: name of destination character set. + +@var{from_codeset}: name of origin character set, as used by @code{str}. + +Convert the string from one character set to another using the +system's @code{iconv()} function. + + Returns newly allocated zero-terminated string which +is @code{str} transcoded into to_codeset. + +@end deftypefun + +@deftypefun {char *} stringprep_locale_to_utf8 (const char * @var{str}) + +@var{str}: input zero terminated string. + +Convert string encoded in the locale's character set into UTF-8 by +using @code{stringprep_convert()}. + + Returns newly allocated zero-terminated string which +is @code{str} transcoded into UTF-8. + +@end deftypefun + +@deftypefun {char *} stringprep_utf8_to_locale (const char * @var{str}) + +@var{str}: input zero terminated string. + +Convert string encoded in UTF-8 into the locale's character set by +using @code{stringprep_convert()}. + + Returns newly allocated zero-terminated string which +is @code{str} transcoded into the locale's character set. + +@end deftypefun + +@deftypefun {int} stringprep_nameprep_no_unassigned (char * @var{in}, int @var{maxlen}) + +@var{in}: input/ouput array with string to prepare. + +@var{maxlen}: maximum length of input/output array. + +Prepare the input UTF-8 string according to the nameprep profile. +The AllowUnassigned flag is false, use @code{stringprep_nameprep()} for +true AllowUnassigned. Returns 0 iff successful, or an error code. + +@end deftypefun + +@deftypefun {int} stringprep_iscsi (char * @var{in}, int @var{maxlen}) + +@var{in}: input/ouput array with string to prepare. + +@var{maxlen}: maximum length of input/output array. + +Prepare the input UTF-8 string according to the draft iSCSI +stringprep profile. Returns 0 iff successful, or an error code. + +@end deftypefun + +@deftypefun {int} stringprep_kerberos5 (char * @var{in}, int @var{maxlen}) + +@var{in}: input/ouput array with string to prepare. + +@var{maxlen}: maximum length of input/output array. + +Prepare the input UTF-8 string according to the draft Kerberos5 +stringprep profile. Returns 0 iff successful, or an error code. + +@end deftypefun + +@deftypefun {int} stringprep_plain (char * @var{in}, int @var{maxlen}) + +@var{in}: input/ouput array with string to prepare. + +@var{maxlen}: maximum length of input/output array. + +Prepare the input UTF-8 string according to the draft SASL +ANONYMOUS profile. Returns 0 iff successful, or an error code. + +@end deftypefun + +@deftypefun {int} stringprep_xmpp_nodeprep (char * @var{in}, int @var{maxlen}) + +@var{in}: input/ouput array with string to prepare. + +@var{maxlen}: maximum length of input/output array. + +Prepare the input UTF-8 string according to the draft XMPP node +identifier profile. Returns 0 iff successful, or an error code. + +@end deftypefun + +@deftypefun {int} stringprep_xmpp_resourceprep (char * @var{in}, int @var{maxlen}) + +@var{in}: input/ouput array with string to prepare. + +@var{maxlen}: maximum length of input/output array. + +Prepare the input UTF-8 string according to the draft XMPP resource +identifier profile. Returns 0 iff successful, or an error code. + +@end deftypefun + +@deftypefun {int} stringprep_generic (char * @var{in}, int @var{maxlen}) + +@var{in}: input/ouput array with string to prepare. + +@var{maxlen}: maximum length of input/output array. + +Prepare the input UTF-8 string according to a hypotetical "generic" +stringprep profile. This is mostly used for debugging or when +constructing new stringprep profiles. Returns 0 iff successful, or +an error code. + +@end deftypefun @c ********************************************************** @c ******************* Punycode Functions ****************** @@ -525,7 +827,43 @@ string of code points drawn from a larger set. Punycode is an instance of Bootstring that uses particular parameter values specified by this document, appropriate for IDNA. -@include libidn-api-punycode.texi +@deftypefun {enum punycode_status} punycode_encode (size_t @var{input_length}, const uint32_t @var{input[]}, const unsigned char @var{case_flags[]}, size_t * @var{output_length}, char @var{output[]}) + +@var{input_length}: The input_length is the number of code points in the input. + +@var{output_length}: The output_length is an in/out argument: the caller +passes in the maximum number of code points that it +can receive, and on successful return it will +contain the number of code points actually output. + +Converts Unicode to Punycode. + + The return value can be any of the punycode_status +values defined above except punycode_bad_input; if +not punycode_success, then output_size and output +might contain garbage. + +@end deftypefun + +@deftypefun {enum punycode_status} punycode_decode (size_t @var{input_length}, const char @var{input[]}, size_t * @var{output_length}, uint32_t @var{output[]}, unsigned char @var{case_flags[]}) + +@var{input_length}: The input_length is the number of code points in the input. + +@var{output_length}: The output_length is an in/out argument: the caller +passes in the maximum number of code points that it +can receive, and on successful return it will +contain the actual number of code points output. + +Converts Punycode to Unicode. + + The return value can be any of the punycode_status +values defined above; if not punycode_success, then +output_length, output, and case_flags might contain +garbage. On success, the decoder will never need to +write an output_length greater than input_length, +because of how the encoding is defined. + +@end deftypefun @c ********************************************************** @c ********************* IDNA Functions ********************* @@ -545,7 +883,272 @@ required in existing protocols like DNS, so that IDNs can be introduced with no changes to the existing infrastructure. IDNA is only meant for processing domain names, not free text. -@include libidn-api-idna.texi +@deftypefun {int} idna_to_ascii_4i (const uint32_t * @var{in}, size_t @var{inlen}, char * @var{out}, int @var{flags}) + +@var{in}: input array with unicode code points. + +@var{inlen}: length of input array with unicode code points. + +@var{out}: output zero terminated string that must have room for at +least 63 characters plus the terminating zero. + +@var{flags}: IDNA flags, e.g. IDNA_ALLOW_UNASSIGNED or IDNA_USE_STD3_ASCII_RULES. + +The ToASCII operation takes a sequence of Unicode code points that make +up one label and transforms it into a sequence of code points in the +ASCII range (0..7F). If ToASCII succeeds, the original sequence and the +resulting sequence are equivalent labels. + +It is important to note that the ToASCII operation can fail. ToASCII +fails if any step of it fails. If any step of the ToASCII operation +fails on any label in a domain name, that domain name MUST NOT be used +as an internationalized domain name. The method for deadling with this +failure is application-specific. + +The inputs to ToASCII are a sequence of code points, the AllowUnassigned +flag, and the UseSTD3ASCIIRules flag. The output of ToASCII is either a +sequence of ASCII code points or a failure condition. + +ToASCII never alters a sequence of code points that are all in the ASCII +range to begin with (although it could fail). Applying the ToASCII +operation multiple times has exactly the same effect as applying it just +once. + + Returns 0 on success, or an error code. + +@end deftypefun + +@deftypefun {int} idna_to_ascii (const unsigned long * @var{in}, size_t @var{inlen}, char * @var{out}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{in}: input array with unicode code points. + +@var{inlen}: length of input array with unicode code points. + +@var{out}: output zero terminated string that must have room for at +least 63 characters plus the terminating zero. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +The ToASCII operation takes a sequence of Unicode code points that make +up one label and transforms it into a sequence of code points in the +ASCII range (0..7F). If ToASCII succeeds, the original sequence and the +resulting sequence are equivalent labels. + +It is important to note that the ToASCII operation can fail. ToASCII +fails if any step of it fails. If any step of the ToASCII operation +fails on any label in a domain name, that domain name MUST NOT be used +as an internationalized domain name. The method for deadling with this +failure is application-specific. + +The inputs to ToASCII are a sequence of code points, the AllowUnassigned +flag, and the UseSTD3ASCIIRules flag. The output of ToASCII is either a +sequence of ASCII code points or a failure condition. + +ToASCII never alters a sequence of code points that are all in the ASCII +range to begin with (although it could fail). Applying the ToASCII +operation multiple times has exactly the same effect as applying it just +once. + + Returns 0 on success, or an error code. + +@end deftypefun + +@deftypefun {int} idna_to_unicode (const unsigned long * @var{in}, size_t @var{inlen}, unsigned long * @var{out}, size_t * @var{outlen}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{in}: input array with unicode code points. + +@var{inlen}: length of input array with unicode code points. + +@var{out}: output array with unicode code points. + +@var{outlen}: on input, maximum size of output array with unicode code points, +on exit, actual size of output array with unicode code points. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +The ToUnicode operation takes a sequence of Unicode code points +that make up one label and returns a sequence of Unicode code +points. If the input sequence is a label in ACE form, then the +result is an equivalent internationalized label that is not in ACE +form, otherwise the original sequence is returned unaltered. + +ToUnicode never fails. If any step fails, then the original input +sequence is returned immediately in that step. + +The ToUnicode output never contains more code points than its +input. Note that the number of octets needed to represent a +sequence of code points depends on the particular character +encoding used. + +The inputs to ToUnicode are a sequence of code points, the +AllowUnassigned flag, and the UseSTD3ASCIIRules flag. The output of +ToUnicode is always a sequence of Unicode code points. + + Returns error condition, but it must only be used for +debugging purposes. The output buffer is always +guaranteed to contain the correct data according to +the specification (sans malloc induced errors). NB! +This means that you normally ignore the return code +from this function, as checking it means breaking the +standard. + +@end deftypefun + +@deftypefun {int} idna_to_ascii_from_ucs4 (const unsigned long * @var{input}, char ** @var{output}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{input}: zero terminated input Unicode string. + +@var{output}: pointer to newly allocated output string. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +Convert UCS-4 domain name to ASCII string. The domain name may +contain several labels, separated by dots. The output buffer must +be deallocated by the caller. + + Returns IDNA_SUCCESS on success, or error code. + +@end deftypefun + +@deftypefun {int} idna_to_ascii_from_utf8 (const char * @var{input}, char ** @var{output}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{input}: zero terminated input UTF-8 string. + +@var{output}: pointer to newly allocated output string. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +Convert UTF-8 domain name to ASCII string. The domain name may +contain several labels, separated by dots. The output buffer must +be deallocated by the caller. + + Returns IDNA_SUCCESS on success, or error code. + +@end deftypefun + +@deftypefun {int} idna_to_ascii_from_locale (const char * @var{input}, char ** @var{output}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{input}: zero terminated input UTF-8 string. + +@var{output}: pointer to newly allocated output string. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +Convert domain name in the locale's encoding to ASCII string. The +domain name may contain several labels, separated by dots. The +output buffer must be deallocated by the caller. + + Returns IDNA_SUCCESS on success, or error code. + +@end deftypefun + +@deftypefun {int} idna_to_unicode_ucs4_from_ucs4 (const unsigned long * @var{input}, unsigned long ** @var{output}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{input}: zero-terminated Unicode string. + +@var{output}: pointer to newly allocated output Unicode string. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +Convert possibly ACE encoded domain name in UCS-4 format into a +UCS-4 string. The domain name may contain several labels, +separated by dots. The output buffer must be deallocated by the +caller. + + Returns IDNA_SUCCESS on success, or error code. + +@end deftypefun + +@deftypefun {int} idna_to_unicode_ucs4_from_utf8 (const char * @var{input}, unsigned long ** @var{output}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{input}: zero-terminated UTF-8 string. + +@var{output}: pointer to newly allocated output Unicode string. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +Convert possibly ACE encoded domain name in UTF-8 format into a +UCS-4 string. The domain name may contain several labels, +separated by dots. The output buffer must be deallocated by the +caller. + + Returns IDNA_SUCCESS on success, or error code. + +@end deftypefun + +@deftypefun {int} idna_to_unicode_utf8_from_utf8 (const char * @var{input}, char ** @var{output}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{input}: zero-terminated UTF-8 string. + +@var{output}: pointer to newly allocated output UTF-8 string. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +Convert possibly ACE encoded domain name in UTF-8 format into a +UTF-8 string. The domain name may contain several labels, +separated by dots. The output buffer must be deallocated by the +caller. + + Returns IDNA_SUCCESS on success, or error code. + +@end deftypefun + +@deftypefun {int} idna_to_unicode_locale_from_utf8 (const char * @var{input}, char ** @var{output}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{input}: zero-terminated UTF-8 string. + +@var{output}: pointer to newly allocated output string encoded in the +current locale's character set. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +Convert possibly ACE encoded domain name in UTF-8 format into a +string encoded in the current locale's character set. The +The domain name may contain several labels, separated by dots. The +output buffer must be deallocated by the caller. + + Returns IDNA_SUCCESS on success, or error code. + +@end deftypefun + +@deftypefun {int} idna_to_unicode_locale_from_locale (const char * @var{input}, char ** @var{output}, int @var{allowunassigned}, int @var{usestd3asciirules}) + +@var{input}: zero-terminated string encoded in the current locale's +character set. + +@var{output}: pointer to newly allocated output string encoded in the +current locale's character set. + +@var{allowunassigned}: whether to allow unassigned code points. + +@var{usestd3asciirules}: whether to check input for STD3 compliance. + +Convert possibly ACE encoded domain name in the locale's character +set into a string encoded in the current locale's character set. +The domain name may contain several labels, separated by dots. The +output buffer must be deallocated by the caller. + + Returns IDNA_SUCCESS on success, or error code. + +@end deftypefun @c ********************************************************** @c *********************** Examples *********************** -- 2.11.4.GIT