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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libidn-idna">
<refmeta>
<refentrytitle role="top_of_page" id="libidn-idna.top_of_page">idna</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBIDN Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>idna</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsynopsisdiv id="libidn-idna.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
#define <link linkend="IDNAPI--CAPS">IDNAPI</link>
enum <link linkend="Idna-rc">Idna_rc</link>;
enum <link linkend="Idna-flags">Idna_flags</link>;
#define <link linkend="IDNA-ACE-PREFIX--CAPS">IDNA_ACE_PREFIX</link>
const <link linkend="char">char</link> * <link linkend="idna-strerror">idna_strerror</link> (<link linkend="Idna-rc">Idna_rc</link> rc);
<link linkend="int">int</link> <link linkend="idna-to-ascii-4i">idna_to_ascii_4i</link> (const <link linkend="uint32-t">uint32_t</link> *in,
<link linkend="size-t">size_t</link> inlen,
<link linkend="char">char</link> *out,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-unicode-44i">idna_to_unicode_44i</link> (const <link linkend="uint32-t">uint32_t</link> *in,
<link linkend="size-t">size_t</link> inlen,
<link linkend="uint32-t">uint32_t</link> *out,
<link linkend="size-t">size_t</link> *outlen,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-ascii-4z">idna_to_ascii_4z</link> (const <link linkend="uint32-t">uint32_t</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-ascii-8z">idna_to_ascii_8z</link> (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-ascii-lz">idna_to_ascii_lz</link> (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-unicode-4z4z">idna_to_unicode_4z4z</link> (const <link linkend="uint32-t">uint32_t</link> *input,
<link linkend="uint32-t">uint32_t</link> **output,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-unicode-8z4z">idna_to_unicode_8z4z</link> (const <link linkend="char">char</link> *input,
<link linkend="uint32-t">uint32_t</link> **output,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-unicode-8z8z">idna_to_unicode_8z8z</link> (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-unicode-8zlz">idna_to_unicode_8zlz</link> (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);
<link linkend="int">int</link> <link linkend="idna-to-unicode-lzlz">idna_to_unicode_lzlz</link> (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);
</synopsis>
</refsynopsisdiv>
<refsect1 id="libidn-idna.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>
<refsect1 id="libidn-idna.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="IDNAPI--CAPS" role="macro">
<title>IDNAPI</title>
<indexterm zone="IDNAPI--CAPS"><primary sortas="IDNAPI">IDNAPI</primary></indexterm><programlisting>#define IDNAPI</programlisting>
<para>
</para></refsect2>
<refsect2 id="Idna-rc" role="enum">
<title>enum Idna_rc</title>
<indexterm zone="Idna-rc"><primary sortas="Idna_rc">Idna_rc</primary></indexterm><programlisting> typedef enum
{
IDNA_SUCCESS = 0,
IDNA_STRINGPREP_ERROR = 1,
IDNA_PUNYCODE_ERROR = 2,
IDNA_CONTAINS_NON_LDH = 3,
/* Workaround typo in earlier versions. */
IDNA_CONTAINS_LDH = IDNA_CONTAINS_NON_LDH,
IDNA_CONTAINS_MINUS = 4,
IDNA_INVALID_LENGTH = 5,
IDNA_NO_ACE_PREFIX = 6,
IDNA_ROUNDTRIP_VERIFY_ERROR = 7,
IDNA_CONTAINS_ACE_PREFIX = 8,
IDNA_ICONV_ERROR = 9,
/* Internal errors. */
IDNA_MALLOC_ERROR = 201,
IDNA_DLOPEN_ERROR = 202
} Idna_rc;
</programlisting>
<para>
Enumerated return codes of <link linkend="idna-to-ascii-4i"><function>idna_to_ascii_4i()</function></link>,
<link linkend="idna-to-unicode-44i"><function>idna_to_unicode_44i()</function></link> functions (and functions derived from those
functions). The value 0 is guaranteed to always correspond to
success.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="IDNA-SUCCESS--CAPS" role="constant">
<term><literal>IDNA_SUCCESS</literal></term>
<listitem><simpara> Successful operation. This value is guaranteed to
always be zero, the remaining ones are only guaranteed to hold
non-zero values, for logical comparison purposes.
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-STRINGPREP-ERROR--CAPS" role="constant">
<term><literal>IDNA_STRINGPREP_ERROR</literal></term>
<listitem><simpara> Error during string preparation.
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-PUNYCODE-ERROR--CAPS" role="constant">
<term><literal>IDNA_PUNYCODE_ERROR</literal></term>
<listitem><simpara> Error during punycode operation.
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-CONTAINS-NON-LDH--CAPS" role="constant">
<term><literal>IDNA_CONTAINS_NON_LDH</literal></term>
<listitem><simpara> For IDNA_USE_STD3_ASCII_RULES, indicate that
the string contains non-LDH ASCII characters.
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-CONTAINS-LDH--CAPS" role="constant">
<term><literal>IDNA_CONTAINS_LDH</literal></term>
<listitem><simpara>
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-CONTAINS-MINUS--CAPS" role="constant">
<term><literal>IDNA_CONTAINS_MINUS</literal></term>
<listitem><simpara> For IDNA_USE_STD3_ASCII_RULES, indicate that
the string contains a leading or trailing hyphen-minus (U+002D).
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-INVALID-LENGTH--CAPS" role="constant">
<term><literal>IDNA_INVALID_LENGTH</literal></term>
<listitem><simpara> The final output string is not within the
(inclusive) range 1 to 63 characters.
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-NO-ACE-PREFIX--CAPS" role="constant">
<term><literal>IDNA_NO_ACE_PREFIX</literal></term>
<listitem><simpara> The string does not contain the ACE prefix
(for ToUnicode).
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-ROUNDTRIP-VERIFY-ERROR--CAPS" role="constant">
<term><literal>IDNA_ROUNDTRIP_VERIFY_ERROR</literal></term>
<listitem><simpara> The ToASCII operation on output
string does not equal the input.
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-CONTAINS-ACE-PREFIX--CAPS" role="constant">
<term><literal>IDNA_CONTAINS_ACE_PREFIX</literal></term>
<listitem><simpara> The input contains the ACE prefix (for
ToASCII).
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-ICONV-ERROR--CAPS" role="constant">
<term><literal>IDNA_ICONV_ERROR</literal></term>
<listitem><simpara> Could not convert string in locale encoding.
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-MALLOC-ERROR--CAPS" role="constant">
<term><literal>IDNA_MALLOC_ERROR</literal></term>
<listitem><simpara> Could not allocate buffer (this is typically a
fatal error).
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-DLOPEN-ERROR--CAPS" role="constant">
<term><literal>IDNA_DLOPEN_ERROR</literal></term>
<listitem><simpara> Could not dlopen the libcidn DSO (only used
internally in libc).
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="Idna-flags" role="enum">
<title>enum Idna_flags</title>
<indexterm zone="Idna-flags"><primary sortas="Idna_flags">Idna_flags</primary></indexterm><programlisting> typedef enum
{
IDNA_ALLOW_UNASSIGNED = 0x0001,
IDNA_USE_STD3_ASCII_RULES = 0x0002
} Idna_flags;
</programlisting>
<para>
Flags to pass to <link linkend="idna-to-ascii-4i"><function>idna_to_ascii_4i()</function></link>, <link linkend="idna-to-unicode-44i"><function>idna_to_unicode_44i()</function></link> etc.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="IDNA-ALLOW-UNASSIGNED--CAPS" role="constant">
<term><literal>IDNA_ALLOW_UNASSIGNED</literal></term>
<listitem><simpara> Don't reject strings containing unassigned
Unicode code points.
</simpara></listitem>
</varlistentry>
<varlistentry id="IDNA-USE-STD3-ASCII-RULES--CAPS" role="constant">
<term><literal>IDNA_USE_STD3_ASCII_RULES</literal></term>
<listitem><simpara> Validate strings according to STD3
rules (i.e., normal host name rules).
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="IDNA-ACE-PREFIX--CAPS" role="macro">
<title>IDNA_ACE_PREFIX</title>
<indexterm zone="IDNA-ACE-PREFIX--CAPS"><primary sortas="IDNA_ACE_PREFIX">IDNA_ACE_PREFIX</primary></indexterm><programlisting># define IDNA_ACE_PREFIX "xn--"
</programlisting>
<para>
The IANA allocated prefix to use for IDNA. "xn--"</para>
<para>
</para></refsect2>
<refsect2 id="idna-strerror" role="function">
<title>idna_strerror ()</title>
<indexterm zone="idna-strerror"><primary sortas="idna_strerror">idna_strerror</primary></indexterm><programlisting>const <link linkend="char">char</link> * idna_strerror (<link linkend="Idna-rc">Idna_rc</link> rc);</programlisting>
<para>
Convert a return code integer to a text string. This string can be
used to output a diagnostic message to the user.
</para>
<para>
IDNA_SUCCESS: Successful operation. This value is guaranteed to
always be zero, the remaining ones are only guaranteed to hold
non-zero values, for logical comparison purposes.
IDNA_STRINGPREP_ERROR: Error during string preparation.
IDNA_PUNYCODE_ERROR: Error during punycode operation.
IDNA_CONTAINS_NON_LDH: For IDNA_USE_STD3_ASCII_RULES, indicate that
the string contains non-LDH ASCII characters.
IDNA_CONTAINS_MINUS: For IDNA_USE_STD3_ASCII_RULES, indicate that
the string contains a leading or trailing hyphen-minus (U+002D).
IDNA_INVALID_LENGTH: The final output string is not within the
(inclusive) range 1 to 63 characters.
IDNA_NO_ACE_PREFIX: The string does not contain the ACE prefix
(for ToUnicode).
IDNA_ROUNDTRIP_VERIFY_ERROR: The ToASCII operation on output
string does not equal the input.
IDNA_CONTAINS_ACE_PREFIX: The input contains the ACE prefix (for
ToASCII).
IDNA_ICONV_ERROR: Could not convert string in locale encoding.
IDNA_MALLOC_ERROR: Could not allocate buffer (this is typically a
fatal error).
IDNA_DLOPEN_ERROR: Could not dlopen the libcidn DSO (only used
internally in libc).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>rc</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-rc"><type>Idna_rc</type></link> return code.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns a pointer to a statically allocated string
containing a description of the error with the return code <parameter>rc</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-ascii-4i" role="function">
<title>idna_to_ascii_4i ()</title>
<indexterm zone="idna-to-ascii-4i"><primary sortas="idna_to_ascii_4i">idna_to_ascii_4i</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_ascii_4i (const <link linkend="uint32-t">uint32_t</link> *in,
<link linkend="size-t">size_t</link> inlen,
<link linkend="char">char</link> *out,
<link linkend="int">int</link> flags);</programlisting>
<para>
The ToASCII operation takes a sequence of Unicode code points that
make up one domain 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.
</para>
<para>
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.
</para>
<para>
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.
</para>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>in</parameter> :</term>
<listitem><simpara> input array with unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>inlen</parameter> :</term>
<listitem><simpara> length of input array with unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>out</parameter> :</term>
<listitem><simpara> output zero terminated string that must have room for at
least 63 characters plus the terminating zero.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns 0 on success, or an <link linkend="Idna-rc"><type>Idna_rc</type></link> error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-unicode-44i" role="function">
<title>idna_to_unicode_44i ()</title>
<indexterm zone="idna-to-unicode-44i"><primary sortas="idna_to_unicode_44i">idna_to_unicode_44i</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_unicode_44i (const <link linkend="uint32-t">uint32_t</link> *in,
<link linkend="size-t">size_t</link> inlen,
<link linkend="uint32-t">uint32_t</link> *out,
<link linkend="size-t">size_t</link> *outlen,
<link linkend="int">int</link> flags);</programlisting>
<para>
The ToUnicode operation takes a sequence of Unicode code points
that make up one domain 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.
</para>
<para>
ToUnicode never fails. If any step fails, then the original input
sequence is returned immediately in that step.
</para>
<para>
The Punycode decoder can never output more code points than it
inputs, but Nameprep can, and therefore ToUnicode can. Note that
the number of octets needed to represent a sequence of code points
depends on the particular character encoding used.
</para>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>in</parameter> :</term>
<listitem><simpara> input array with unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>inlen</parameter> :</term>
<listitem><simpara> length of input array with unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>out</parameter> :</term>
<listitem><simpara> output array with unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>outlen</parameter> :</term>
<listitem><simpara> on input, maximum size of output array with unicode code points,
on exit, actual size of output array with unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="Idna-rc"><type>Idna_rc</type></link> 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.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-ascii-4z" role="function">
<title>idna_to_ascii_4z ()</title>
<indexterm zone="idna-to-ascii-4z"><primary sortas="idna_to_ascii_4z">idna_to_ascii_4z</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_ascii_4z (const <link linkend="uint32-t">uint32_t</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>input</parameter> :</term>
<listitem><simpara> zero terminated input Unicode string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output</parameter> :</term>
<listitem><simpara> pointer to newly allocated output string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="IDNA-SUCCESS--CAPS"><literal>IDNA_SUCCESS</literal></link> on success, or error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-ascii-8z" role="function">
<title>idna_to_ascii_8z ()</title>
<indexterm zone="idna-to-ascii-8z"><primary sortas="idna_to_ascii_8z">idna_to_ascii_8z</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_ascii_8z (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>input</parameter> :</term>
<listitem><simpara> zero terminated input UTF-8 string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output</parameter> :</term>
<listitem><simpara> pointer to newly allocated output string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="IDNA-SUCCESS--CAPS"><literal>IDNA_SUCCESS</literal></link> on success, or error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-ascii-lz" role="function">
<title>idna_to_ascii_lz ()</title>
<indexterm zone="idna-to-ascii-lz"><primary sortas="idna_to_ascii_lz">idna_to_ascii_lz</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_ascii_lz (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>input</parameter> :</term>
<listitem><simpara> zero terminated input string encoded in the current locale's
character set.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output</parameter> :</term>
<listitem><simpara> pointer to newly allocated output string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="IDNA-SUCCESS--CAPS"><literal>IDNA_SUCCESS</literal></link> on success, or error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-unicode-4z4z" role="function">
<title>idna_to_unicode_4z4z ()</title>
<indexterm zone="idna-to-unicode-4z4z"><primary sortas="idna_to_unicode_4z4z">idna_to_unicode_4z4z</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_unicode_4z4z (const <link linkend="uint32-t">uint32_t</link> *input,
<link linkend="uint32-t">uint32_t</link> **output,
<link linkend="int">int</link> flags);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>input</parameter> :</term>
<listitem><simpara> zero-terminated Unicode string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output</parameter> :</term>
<listitem><simpara> pointer to newly allocated output Unicode string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="IDNA-SUCCESS--CAPS"><literal>IDNA_SUCCESS</literal></link> on success, or error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-unicode-8z4z" role="function">
<title>idna_to_unicode_8z4z ()</title>
<indexterm zone="idna-to-unicode-8z4z"><primary sortas="idna_to_unicode_8z4z">idna_to_unicode_8z4z</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_unicode_8z4z (const <link linkend="char">char</link> *input,
<link linkend="uint32-t">uint32_t</link> **output,
<link linkend="int">int</link> flags);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>input</parameter> :</term>
<listitem><simpara> zero-terminated UTF-8 string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output</parameter> :</term>
<listitem><simpara> pointer to newly allocated output Unicode string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="IDNA-SUCCESS--CAPS"><literal>IDNA_SUCCESS</literal></link> on success, or error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-unicode-8z8z" role="function">
<title>idna_to_unicode_8z8z ()</title>
<indexterm zone="idna-to-unicode-8z8z"><primary sortas="idna_to_unicode_8z8z">idna_to_unicode_8z8z</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_unicode_8z8z (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>input</parameter> :</term>
<listitem><simpara> zero-terminated UTF-8 string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output</parameter> :</term>
<listitem><simpara> pointer to newly allocated output UTF-8 string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="IDNA-SUCCESS--CAPS"><literal>IDNA_SUCCESS</literal></link> on success, or error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-unicode-8zlz" role="function">
<title>idna_to_unicode_8zlz ()</title>
<indexterm zone="idna-to-unicode-8zlz"><primary sortas="idna_to_unicode_8zlz">idna_to_unicode_8zlz</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_unicode_8zlz (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);</programlisting>
<para>
Convert possibly ACE encoded domain name in UTF-8 format 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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>input</parameter> :</term>
<listitem><simpara> zero-terminated UTF-8 string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output</parameter> :</term>
<listitem><simpara> pointer to newly allocated output string encoded in the
current locale's character set.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="IDNA-SUCCESS--CAPS"><literal>IDNA_SUCCESS</literal></link> on success, or error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="idna-to-unicode-lzlz" role="function">
<title>idna_to_unicode_lzlz ()</title>
<indexterm zone="idna-to-unicode-lzlz"><primary sortas="idna_to_unicode_lzlz">idna_to_unicode_lzlz</primary></indexterm><programlisting><link linkend="int">int</link> idna_to_unicode_lzlz (const <link linkend="char">char</link> *input,
<link linkend="char">char</link> **output,
<link linkend="int">int</link> flags);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>input</parameter> :</term>
<listitem><simpara> zero-terminated string encoded in the current locale's
character set.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output</parameter> :</term>
<listitem><simpara> pointer to newly allocated output string encoded in the
current locale's character set.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> an <link linkend="Idna-flags"><type>Idna_flags</type></link> value, e.g., <link linkend="IDNA-ALLOW-UNASSIGNED--CAPS"><literal>IDNA_ALLOW_UNASSIGNED</literal></link> or
<link linkend="IDNA-USE-STD3-ASCII-RULES--CAPS"><literal>IDNA_USE_STD3_ASCII_RULES</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns <link linkend="IDNA-SUCCESS--CAPS"><literal>IDNA_SUCCESS</literal></link> on success, or error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>
|