From e6d4a8daf3497986d55bd4b4cfd85b11bc5684d1 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 4 May 2018 10:20:16 +0200 Subject: Issue #325 Part 1: Remove the legacy non-IDNA2008 code path from nsIDNService. --- netwerk/dns/moz.build | 8 +- netwerk/dns/nameprep.c | 347 ------ netwerk/dns/nameprep_template.c | 139 --- netwerk/dns/nameprepdata.c | 2588 --------------------------------------- netwerk/dns/nsIDNService.cpp | 120 +- netwerk/dns/nsIDNService.h | 10 - 6 files changed, 3 insertions(+), 3209 deletions(-) delete mode 100644 netwerk/dns/nameprep.c delete mode 100644 netwerk/dns/nameprep_template.c delete mode 100644 netwerk/dns/nameprepdata.c (limited to 'netwerk/dns') diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build index f788d9a33..c3b84df2f 100644 --- a/netwerk/dns/moz.build +++ b/netwerk/dns/moz.build @@ -66,13 +66,7 @@ LOCAL_INCLUDES += [ '/netwerk/base', ] -if CONFIG['ENABLE_INTL_API']: - DEFINES['IDNA2008'] = True - USE_LIBS += ['icu'] -else: - UNIFIED_SOURCES += [ - 'nameprep.c', - ] +USE_LIBS += ['icu'] if CONFIG['GNU_CXX']: CXXFLAGS += ['-Wno-error=shadow'] diff --git a/netwerk/dns/nameprep.c b/netwerk/dns/nameprep.c deleted file mode 100644 index 039797885..000000000 --- a/netwerk/dns/nameprep.c +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Copyright (c) 2001,2002 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." - * - * 4. The name of JPNIC may not be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - - -#include -#include - -#include "nsIDNKitInterface.h" - -#define UCS_MAX 0x7fffffff -#define UNICODE_MAX 0x10ffff - - -/* - * Load NAMEPREP compiled tables. - */ -#include "nameprepdata.c" - -/* - * Define mapping/checking functions for each version of the draft. - */ - -#define VERSION id11 -#include "nameprep_template.c" -#undef VERSION - -typedef const char *(*nameprep_mapproc)(uint32_t v); -typedef int (*nameprep_checkproc)(uint32_t v); -typedef idn_biditype_t (*nameprep_biditypeproc)(uint32_t v); - -static struct idn_nameprep { - char *version; - nameprep_mapproc map_proc; - nameprep_checkproc prohibited_proc; - nameprep_checkproc unassigned_proc; - nameprep_biditypeproc biditype_proc; -} nameprep_versions[] = { -#define MAKE_NAMEPREP_HANDLE(version, id) \ - { version, \ - compose_sym2(nameprep_map_, id), \ - compose_sym2(nameprep_prohibited_, id), \ - compose_sym2(nameprep_unassigned_, id), \ - compose_sym2(nameprep_biditype_, id), } - MAKE_NAMEPREP_HANDLE("nameprep-11", id11), - { NULL, NULL, NULL, NULL, NULL }, -}; - -static idn_result_t idn_nameprep_check(nameprep_checkproc proc, - const uint32_t *str, - const uint32_t **found); - -idn_result_t -idn_nameprep_create(const char *version, idn_nameprep_t *handlep) { - idn_nameprep_t handle; - - assert(handlep != NULL); - - TRACE(("idn_nameprep_create(version=%-.50s)\n", - version == NULL ? "" : version)); - - if (version == NULL) - version = IDN_NAMEPREP_CURRENT; - - /* - * Lookup table for the specified version. Since the number of - * versions won't be large (I don't want see draft-23 or such :-), - * simple linear search is OK. - */ - for (handle = nameprep_versions; handle->version != NULL; handle++) { - if (strcmp(handle->version, version) == 0) { - *handlep = handle; - return (idn_success); - } - } - return (idn_notfound); -} - -void -idn_nameprep_destroy(idn_nameprep_t handle) { - assert(handle != NULL); - - TRACE(("idn_nameprep_destroy()\n")); - - /* Nothing to do. */ -} - -idn_result_t -idn_nameprep_map(idn_nameprep_t handle, const uint32_t *from, - uint32_t *to, size_t tolen) { - assert(handle != NULL && from != NULL && to != NULL); - - TRACE(("idn_nameprep_map(ctx=%s, from=\"%s\")\n", - handle->version, idn__debug_ucs4xstring(from, 50))); - - while (*from != '\0') { - uint32_t v = *from; - const char *mapped; - - if (v > UCS_MAX) { - /* This cannot happen, but just in case.. */ - return (idn_invalid_codepoint); - } else if (v > UNICODE_MAX) { - /* No mapping is possible. */ - mapped = NULL; - } else { - /* Try mapping. */ - mapped = (*handle->map_proc)(v); - } - - if (mapped == NULL) { - /* No mapping. Just copy verbatim. */ - if (tolen < 1) - return (idn_buffer_overflow); - *to++ = v; - tolen--; - } else { - const unsigned char *mappeddata; - size_t mappedlen; - - mappeddata = (const unsigned char *)mapped + 1; - mappedlen = *mapped; - - if (tolen < (mappedlen + 3) / 4) - return (idn_buffer_overflow); - tolen -= (mappedlen + 3) / 4; - while (mappedlen >= 4) { - *to = *mappeddata++; - *to |= *mappeddata++ << 8; - *to |= *mappeddata++ << 16; - *to |= *mappeddata++ << 24; - mappedlen -= 4; - to++; - } - if (mappedlen > 0) { - *to = *mappeddata++; - *to |= (mappedlen >= 2) ? - *mappeddata++ << 8: 0; - *to |= (mappedlen >= 3) ? - *mappeddata++ << 16: 0; - to++; - } - } - from++; - } - if (tolen == 0) - return (idn_buffer_overflow); - *to = '\0'; - return (idn_success); -} - -idn_result_t -idn_nameprep_isprohibited(idn_nameprep_t handle, const uint32_t *str, - const uint32_t **found) { - assert(handle != NULL && str != NULL && found != NULL); - - TRACE(("idn_nameprep_isprohibited(ctx=%s, str=\"%s\")\n", - handle->version, idn__debug_ucs4xstring(str, 50))); - - return (idn_nameprep_check(handle->prohibited_proc, str, found)); -} - -idn_result_t -idn_nameprep_isunassigned(idn_nameprep_t handle, const uint32_t *str, - const uint32_t **found) { - assert(handle != NULL && str != NULL && found != NULL); - - TRACE(("idn_nameprep_isunassigned(handle->version, str=\"%s\")\n", - handle->version, idn__debug_ucs4xstring(str, 50))); - - return (idn_nameprep_check(handle->unassigned_proc, str, found)); -} - -static idn_result_t -idn_nameprep_check(nameprep_checkproc proc, const uint32_t *str, - const uint32_t **found) { - uint32_t v; - - while (*str != '\0') { - v = *str; - - if (v > UCS_MAX) { - /* This cannot happen, but just in case.. */ - return (idn_invalid_codepoint); - } else if (v > UNICODE_MAX) { - /* It is invalid.. */ - *found = str; - return (idn_success); - } else if ((*proc)(v)) { - *found = str; - return (idn_success); - } - str++; - } - *found = NULL; - return (idn_success); -} - -idn_result_t -idn_nameprep_isvalidbidi(idn_nameprep_t handle, const uint32_t *str, - const uint32_t **found) { - uint32_t v; - idn_biditype_t first_char; - idn_biditype_t last_char; - int found_r_al; - - assert(handle != NULL && str != NULL && found != NULL); - - TRACE(("idn_nameprep_isvalidbidi(ctx=%s, str=\"%s\")\n", - handle->version, idn__debug_ucs4xstring(str, 50))); - - if (*str == '\0') { - *found = NULL; - return (idn_success); - } - - /* - * check first character's type and initialize variables. - */ - found_r_al = 0; - if (*str > UCS_MAX) { - /* This cannot happen, but just in case.. */ - return (idn_invalid_codepoint); - } else if (*str > UNICODE_MAX) { - /* It is invalid.. */ - *found = str; - return (idn_success); - } - first_char = last_char = (*(handle->biditype_proc))(*str); - if (first_char == idn_biditype_r_al) { - found_r_al = 1; - } - str++; - - /* - * see whether string is valid or not. - */ - while (*str != '\0') { - v = *str; - - if (v > UCS_MAX) { - /* This cannot happen, but just in case.. */ - return (idn_invalid_codepoint); - } else if (v > UNICODE_MAX) { - /* It is invalid.. */ - *found = str; - return (idn_success); - } else { - last_char = (*(handle->biditype_proc))(v); - if (found_r_al && last_char == idn_biditype_l) { - *found = str; - return (idn_success); - } - if (first_char != idn_biditype_r_al && last_char == idn_biditype_r_al) { - *found = str; - return (idn_success); - } - if (last_char == idn_biditype_r_al) { - found_r_al = 1; - } - } - str++; - } - - if (found_r_al) { - if (last_char != idn_biditype_r_al) { - *found = str - 1; - return (idn_success); - } - } - - *found = NULL; - return (idn_success); -} - -idn_result_t -idn_nameprep_createproc(const char *parameter, void **handlep) { - return idn_nameprep_create(parameter, (idn_nameprep_t *)handlep); -} - -void -idn_nameprep_destroyproc(void *handle) { - idn_nameprep_destroy((idn_nameprep_t)handle); -} - -idn_result_t -idn_nameprep_mapproc(void *handle, const uint32_t *from, - uint32_t *to, size_t tolen) { - return idn_nameprep_map((idn_nameprep_t)handle, from, to, tolen); -} - -idn_result_t -idn_nameprep_prohibitproc(void *handle, const uint32_t *str, - const uint32_t **found) { - return idn_nameprep_isprohibited((idn_nameprep_t)handle, str, found); -} - -idn_result_t -idn_nameprep_unassignedproc(void *handle, const uint32_t *str, - const uint32_t **found) { - return idn_nameprep_isunassigned((idn_nameprep_t)handle, str, found); -} - -idn_result_t -idn_nameprep_bidiproc(void *handle, const uint32_t *str, - const uint32_t **found) { - return idn_nameprep_isvalidbidi((idn_nameprep_t)handle, str, found); -} diff --git a/netwerk/dns/nameprep_template.c b/netwerk/dns/nameprep_template.c deleted file mode 100644 index 7fe36518a..000000000 --- a/netwerk/dns/nameprep_template.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." - * - * 4. The name of JPNIC may not be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - -/* - * Include this file once for each version of NAMEPREP. - * VERSION should be defined to appropriate value before inclusion. - */ - -#ifndef NAMEPREP_TEMPLATE_INIT -#define NAMEPREP_TEMPLATE_INIT - -/* Symbol composition. */ -#define compose_sym2(a, b) compose_sym2X(a, b) -#define compose_sym2X(a, b) a ## b -#define compose_sym3(a, b, c) compose_sym3X(a, b, c) -#define compose_sym3X(a, b, c) a ## b ## c - -/* The table is based on "Optimized Two-Stage Table" mentioned in - * Unicode 3.0 page 106, extended to handle 21bit data instead of 16 bit. - */ - -/* Index calculation for multi-level index tables. */ -#define IDX0(type, v) IDX_0(v, BITS1(type), BITS2(type)) -#define IDX1(type, v) IDX_1(v, BITS1(type), BITS2(type)) -#define IDX2(type, v) IDX_2(v, BITS1(type), BITS2(type)) - -#define IDX_0(v, bits1, bits2) ((v) >> ((bits1) + (bits2))) -#define IDX_1(v, bits1, bits2) (((v) >> (bits2)) & ((1 << (bits1)) - 1)) -#define IDX_2(v, bits1, bits2) ((v) & ((1 << (bits2)) - 1)) - -#define BITS1(type) type ## _BITS_1 -#define BITS2(type) type ## _BITS_2 - -#endif /* NAMEPREP_TEMPLATE_INIT */ - -static const char * -compose_sym2(nameprep_map_, VERSION) (uint32_t v) { - int idx0 = IDX0(MAP, v); - int idx1 = IDX1(MAP, v); - int idx2 = IDX2(MAP, v); - int offset; - -#define IMAP compose_sym3(nameprep_, VERSION, _map_imap) -#define TABLE compose_sym3(nameprep_, VERSION, _map_table) -#define DATA compose_sym3(nameprep_, VERSION, _map_data) - offset = TABLE[IMAP[IMAP[idx0] + idx1]].tbl[idx2]; - if (offset == 0) - return (NULL); /* no mapping */ - return (const char *)(DATA + offset); -#undef IMAP -#undef TABLE -#undef DATA -} - -static int -compose_sym2(nameprep_prohibited_, VERSION) (uint32_t v) { - int idx0 = IDX0(PROH, v); - int idx1 = IDX1(PROH, v); - int idx2 = IDX2(PROH, v); - const unsigned char *bm; - -#define IMAP compose_sym3(nameprep_, VERSION, _prohibited_imap) -#define BITMAP compose_sym3(nameprep_, VERSION, _prohibited_bitmap) - bm = BITMAP[IMAP[IMAP[idx0] + idx1]].bm; - return (bm[idx2 / 8] & (1 << (idx2 % 8))); -#undef IMAP -#undef BITMAP -} - -static int -compose_sym2(nameprep_unassigned_, VERSION) (uint32_t v) { - int idx0 = IDX0(UNAS, v); - int idx1 = IDX1(UNAS, v); - int idx2 = IDX2(UNAS, v); - const unsigned char *bm; - -#define IMAP compose_sym3(nameprep_, VERSION, _unassigned_imap) -#define BITMAP compose_sym3(nameprep_, VERSION, _unassigned_bitmap) - bm = BITMAP[IMAP[IMAP[idx0] + idx1]].bm; - return (bm[idx2 / 8] & (1 << (idx2 % 8))); -#undef IMAP -#undef BITMAP -} - -static idn_biditype_t -compose_sym2(nameprep_biditype_, VERSION) (uint32_t v) { - int idx0 = IDX0(BIDI, v); - int idx1 = IDX1(BIDI, v); - int idx2 = IDX2(BIDI, v); - int offset; - -#define IMAP compose_sym3(nameprep_, VERSION, _bidi_imap) -#define TABLE compose_sym3(nameprep_, VERSION, _bidi_table) -#define DATA compose_sym3(nameprep_, VERSION, _bidi_data) - offset = TABLE[IMAP[IMAP[idx0] + idx1]].tbl[idx2]; - return DATA[offset]; -#undef IMAP -#undef TABLE -#undef DATA -} diff --git a/netwerk/dns/nameprepdata.c b/netwerk/dns/nameprepdata.c deleted file mode 100644 index cd7e2db0e..000000000 --- a/netwerk/dns/nameprepdata.c +++ /dev/null @@ -1,2588 +0,0 @@ -/* - * Copyright (c) 2001,2002 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." - * - * 4. The name of JPNIC may not be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - - /* - * Do not edit this file! - * This file is generated from NAMEPREP specification. - */ - -#define MAP_BITS_0 9 -#define MAP_BITS_1 7 -#define MAP_BITS_2 5 - -#define PROH_BITS_0 7 -#define PROH_BITS_1 7 -#define PROH_BITS_2 7 - -#define UNAS_BITS_0 7 -#define UNAS_BITS_1 7 -#define UNAS_BITS_2 7 - -#define BIDI_BITS_0 9 -#define BIDI_BITS_1 7 -#define BIDI_BITS_2 5 - - -static const unsigned short nameprep_id11_map_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 1040, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 1168, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784,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 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} nameprep_id11_map_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, - 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, - 44, 46, 48, 50, 52, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 54, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, - 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, - 101, 0, 103, 105, 107, 109, 111, 113, 115, 117, - }}, - {{ - 123, 0, 126, 0, 129, 0, 132, 0, 135, 0, 138, - 0, 141, 0, 144, 0, 147, 0, 150, 0, 153, 0, - 156, 0, 159, 0, 162, 0, 165, 0, 168, 0, - }}, - {{ - 171, 0, 174, 0, 177, 0, 180, 0, 183, 0, 186, - 0, 189, 0, 192, 0, 195, 0, 202, 0, 205, 0, - 208, 0, 0, 211, 0, 214, 0, 217, 0, 220, - }}, - {{ - 0, 223, 0, 226, 0, 229, 0, 232, 0, 235, 241, - 0, 244, 0, 247, 0, 250, 0, 253, 0, 256, 0, - 259, 0, 262, 0, 265, 0, 268, 0, 271, 0, - }}, - {{ - 274, 0, 277, 0, 280, 0, 283, 0, 286, 0, 289, - 0, 292, 0, 295, 0, 298, 0, 301, 0, 304, 0, - 307, 0, 310, 312, 0, 315, 0, 318, 0, 38, - }}, - {{ - 0, 321, 324, 0, 327, 0, 330, 333, 0, 336, 339, - 342, 0, 0, 345, 348, 351, 354, 0, 357, 360, 0, - 363, 366, 369, 0, 0, 0, 372, 375, 0, 378, - }}, - {{ - 381, 0, 384, 0, 387, 0, 390, 393, 0, 396, 0, - 0, 399, 0, 402, 405, 0, 408, 411, 414, 0, 417, - 0, 420, 423, 0, 0, 0, 426, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 429, 429, 0, 432, 432, 0, 435, - 435, 0, 438, 0, 441, 0, 444, 0, 447, 0, 450, - 0, 453, 0, 456, 0, 459, 0, 0, 462, 0, - }}, - {{ - 465, 0, 468, 0, 471, 0, 474, 0, 477, 0, 480, - 0, 483, 0, 486, 0, 489, 496, 496, 0, 499, 0, - 502, 505, 508, 0, 511, 0, 514, 0, 517, 0, - }}, - {{ - 520, 0, 523, 0, 526, 0, 529, 0, 532, 0, 535, - 0, 538, 0, 541, 0, 544, 0, 547, 0, 550, 0, - 553, 0, 556, 0, 559, 0, 562, 0, 565, 0, - }}, - {{ - 568, 0, 571, 0, 574, 0, 577, 0, 580, 0, 583, - 0, 586, 0, 589, 0, 592, 0, 595, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 598, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 601, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 608, 0, 611, 614, 617, - 0, 620, 0, 623, 626, 629, 640, 643, 646, 649, 652, - 655, 658, 661, 598, 664, 667, 54, 670, 673, 676, - }}, - {{ - 679, 682, 0, 685, 688, 691, 694, 697, 700, 703, 706, - 709, 0, 0, 0, 0, 712, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 685, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 643, 661, 691, 623, 709, 694, - 679, 0, 723, 0, 726, 0, 729, 0, 732, 0, - }}, - {{ - 735, 0, 738, 0, 741, 0, 744, 0, 747, 0, 750, - 0, 753, 0, 756, 0, 664, 682, 685, 0, 661, 652, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 759, 762, 765, 768, 771, 774, 777, 780, 783, 786, 789, - 792, 795, 798, 801, 804, 807, 810, 813, 816, 819, 822, - 825, 828, 831, 834, 837, 840, 843, 846, 849, 852, - }}, - {{ - 855, 858, 861, 864, 867, 870, 873, 876, 879, 882, 885, - 888, 891, 894, 897, 900, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 903, 0, 906, 0, 909, 0, 912, 0, 915, 0, 918, - 0, 921, 0, 924, 0, 927, 0, 930, 0, 933, 0, - 936, 0, 939, 0, 942, 0, 945, 0, 948, 0, - }}, - {{ - 951, 0, 0, 0, 0, 0, 0, 0, 0, 0, 954, - 0, 957, 0, 960, 0, 963, 0, 966, 0, 969, 0, - 972, 0, 975, 0, 978, 0, 981, 0, 984, 0, - }}, - {{ - 987, 0, 990, 0, 993, 0, 996, 0, 999, 0, 1002, - 0, 1005, 0, 1008, 0, 1011, 0, 1014, 0, 1017, 0, - 1020, 0, 1023, 0, 1026, 0, 1029, 0, 1032, 0, - }}, - {{ - 0, 1035, 0, 1038, 0, 1041, 0, 1044, 0, 1047, 0, - 1050, 0, 1053, 0, 0, 1056, 0, 1059, 0, 1062, 0, - 1065, 0, 1068, 0, 1071, 0, 1074, 0, 1077, 0, - }}, - {{ - 1080, 0, 1083, 0, 1086, 0, 1089, 0, 1092, 0, 1095, - 0, 1098, 0, 1101, 0, 1104, 0, 1107, 0, 1110, 0, - 0, 0, 1113, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1116, 0, 1119, 0, 1122, 0, 1125, 0, 1128, 0, 1131, - 0, 1134, 0, 1137, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1140, 1143, 1146, 1149, 1152, - 1155, 1158, 1161, 1164, 1167, 1170, 1173, 1176, 1179, 1182, - }}, - {{ - 1185, 1188, 1191, 1194, 1197, 1200, 1203, 1206, 1209, 1212, 1215, - 1218, 1221, 1224, 1227, 1230, 1233, 1236, 1239, 1242, 1245, 1248, - 1251, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 1254, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1261, 0, 1264, 0, 1267, 0, 1270, 0, 1273, 0, 1276, - 0, 1279, 0, 1282, 0, 1285, 0, 1288, 0, 1291, 0, - 1294, 0, 1297, 0, 1300, 0, 1303, 0, 1306, 0, - }}, - {{ - 1309, 0, 1312, 0, 1315, 0, 1318, 0, 1321, 0, 1324, - 0, 1327, 0, 1330, 0, 1333, 0, 1336, 0, 1339, 0, - 1342, 0, 1345, 0, 1348, 0, 1351, 0, 1354, 0, - }}, - {{ - 1357, 0, 1360, 0, 1363, 0, 1366, 0, 1369, 0, 1372, - 0, 1375, 0, 1378, 0, 1381, 0, 1384, 0, 1387, 0, - 1390, 0, 1393, 0, 1396, 0, 1399, 0, 1402, 0, - }}, - {{ - 1405, 0, 1408, 0, 1411, 0, 1414, 0, 1417, 0, 1420, - 0, 1423, 0, 1426, 0, 1429, 0, 1432, 0, 1435, 0, - 1438, 0, 1441, 0, 1444, 0, 1447, 0, 1450, 0, - }}, - {{ - 1453, 0, 1456, 0, 1459, 0, 1462, 0, 1465, 0, 1468, - 0, 1471, 0, 1474, 0, 1477, 0, 1480, 0, 1483, 0, - 1486, 1493, 1500, 1507, 1514, 1405, 0, 0, 0, 0, - }}, - {{ - 1521, 0, 1524, 0, 1527, 0, 1530, 0, 1533, 0, 1536, - 0, 1539, 0, 1542, 0, 1545, 0, 1548, 0, 1551, 0, - 1554, 0, 1557, 0, 1560, 0, 1563, 0, 1566, 0, - }}, - {{ - 1569, 0, 1572, 0, 1575, 0, 1578, 0, 1581, 0, 1584, - 0, 1587, 0, 1590, 0, 1593, 0, 1596, 0, 1599, 0, - 1602, 0, 1605, 0, 1608, 0, 1611, 0, 1614, 0, - }}, - {{ - 1617, 0, 1620, 0, 1623, 0, 1626, 0, 1629, 0, 1632, - 0, 1635, 0, 1638, 0, 1641, 0, 1644, 0, 1647, 0, - 1650, 0, 1653, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1656, 1659, 1662, - 1665, 1668, 1671, 1674, 1677, 0, 0, 0, 0, 0, 0, - 0, 0, 1680, 1683, 1686, 1689, 1692, 1695, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1698, 1701, 1704, - 1707, 1710, 1713, 1716, 1719, 0, 0, 0, 0, 0, 0, - 0, 0, 1722, 1725, 1728, 1731, 1734, 1737, 1740, 1743, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1746, 1749, 1752, - 1755, 1758, 1761, 0, 0, 1764, 0, 1771, 0, 1782, 0, - 1793, 0, 0, 1804, 0, 1807, 0, 1810, 0, 1813, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1816, 1819, 1822, - 1825, 1828, 1831, 1834, 1837, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1840, 1847, 1854, 1861, 1868, 1875, 1882, 1889, 1840, 1847, 1854, - 1861, 1868, 1875, 1882, 1889, 1896, 1903, 1910, 1917, 1924, 1931, - 1938, 1945, 1896, 1903, 1910, 1917, 1924, 1931, 1938, 1945, - }}, - {{ - 1952, 1959, 1966, 1973, 1980, 1987, 1994, 2001, 1952, 1959, 1966, - 1973, 1980, 1987, 1994, 2001, 0, 0, 2008, 2015, 2022, 0, - 2029, 2036, 2047, 2050, 2053, 2056, 2015, 0, 598, 0, - }}, - {{ - 0, 0, 2059, 2066, 2073, 0, 2080, 2087, 2098, 2101, 2104, - 2107, 2066, 0, 0, 0, 0, 0, 2110, 629, 0, 0, - 2121, 2128, 2139, 2142, 2145, 2148, 0, 0, 0, 0, - }}, - {{ - 0, 0, 2151, 712, 2162, 0, 2169, 2176, 2187, 2190, 2193, - 2196, 2199, 0, 0, 0, 0, 0, 2202, 2209, 2216, 0, - 2223, 2230, 2241, 2244, 2247, 2250, 2209, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 2253, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 6, 2259, 0, 0, 0, 351, 0, 2265, 0, - 16, 16, 16, 0, 0, 18, 18, 24, 0, 0, 28, - 2271, 0, 0, 32, 34, 36, 36, 36, 0, 0, - }}, - {{ - 2277, 2283, 2293, 0, 52, 0, 703, 0, 52, 0, 22, - 67, 4, 6, 0, 0, 10, 12, 0, 26, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 646, 679, - }}, - {{ - 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2299, 2302, 2305, 2308, 2311, 2314, 2317, 2320, 2323, 2326, 2329, - 2332, 2335, 2338, 2341, 2344, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2347, 2350, 2353, 2356, 2359, 2362, 2365, 2368, 2371, 2374, - }}, - {{ - 2377, 2380, 2383, 2386, 2389, 2392, 2395, 2398, 2401, 2404, 2407, - 2410, 2413, 2416, 2419, 2422, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2425, 0, 2435, 0, 2441, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2447, 2453, 2459, 2465, 2471, 2477, 2483, 2489, 0, 0, 2495, - 2501, 2507, 0, 0, 0, 2513, 2519, 2529, 2539, 2549, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2447, 2559, - 2569, 2579, 0, 0, 0, 0, 0, 0, 0, 2589, 2595, - 2601, 2607, 2613, 2607, 2619, 2625, 2631, 2637, 2643, 2637, - }}, - {{ - 2649, 2656, 0, 2663, 0, 0, 2669, 2683, 2693, 2699, 0, - 2705, 0, 2711, 2717, 0, 0, 0, 0, 0, 0, 0, - 0, 2723, 0, 2729, 2739, 0, 2745, 2751, 0, 0, - }}, - {{ - 2757, 2763, 2769, 2775, 2785, 2795, 2795, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2801, 2808, 2815, - 2822, 2829, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - }}, - {{ - 0, 2836, 2839, 2842, 2845, 2848, 2851, 2854, 2857, 2860, 2863, - 2866, 2869, 2872, 2875, 2878, 2881, 2884, 2887, 2890, 2893, 2896, - 2899, 2902, 2905, 2908, 2911, 0, 0, 0, 0, 0, - }}, - {{ - 2914, 2918, 2922, 2926, 2930, 2934, 2938, 2942, 2946, 2950, 2954, - 2958, 2962, 2966, 2970, 2974, 2978, 2982, 2986, 2990, 2994, 2998, - 3002, 3006, 3010, 3014, 3018, 3022, 3026, 3030, 3034, 3038, - }}, - {{ - 3042, 3046, 3050, 3054, 3058, 3062, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, - 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, - 46, 48, 50, 52, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, - 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, - }}, - {{ - 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 6, - 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, - 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, - }}, - {{ - 50, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 0, 6, 8, - }}, - {{ - 0, 0, 14, 0, 0, 20, 22, 0, 0, 28, 30, - 32, 34, 0, 38, 40, 42, 44, 46, 48, 50, 52, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 4, 6, 8, 10, 12, - 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, - }}, - {{ - 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 2, 4, 0, 8, 10, 12, 14, - 0, 0, 20, 22, 24, 26, 28, 30, 32, 34, 0, - 38, 40, 42, 44, 46, 48, 50, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 4, 0, 8, 10, 12, 14, 0, - }}, - {{ - 18, 20, 22, 24, 26, 0, 30, 0, 0, 0, 38, - 40, 42, 44, 46, 48, 50, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, - 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, - }}, - {{ - 42, 44, 46, 48, 50, 52, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 50, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 4, 6, 8, - }}, - {{ - 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 640, 643, 646, - 649, 652, 655, 658, 661, 598, 664, 667, 54, 670, 673, - 676, 679, 682, 661, 685, 688, 691, 694, 697, 700, - }}, - {{ - 703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 685, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 640, 643, 646, 649, 652, 655, 658, 661, 598, - 664, 667, 54, 670, 673, 676, 679, 682, 661, 685, 688, - 691, 694, 697, 700, 703, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 685, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 640, 643, 646, 649, - }}, - {{ - 652, 655, 658, 661, 598, 664, 667, 54, 670, 673, 676, - 679, 682, 661, 685, 688, 691, 694, 697, 700, 703, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 685, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 640, 643, 646, 649, 652, 655, 658, 661, 598, 664, - }}, - {{ - 667, 54, 670, 673, 676, 679, 682, 661, 685, 688, 691, - 694, 697, 700, 703, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 685, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 640, 643, 646, 649, 652, 655, - 658, 661, 598, 664, 667, 54, 670, 673, 676, 679, - }}, - {{ - 682, 661, 685, 688, 691, 694, 697, 700, 703, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 685, 0, 0, 0, 0, - }}, -}; - -static const unsigned char nameprep_id11_map_data[] = { - 0, 0, 1, 97, 1, 98, 1, 99, 1, 100, 1, 101, - 1, 102, 1, 103, 1, 104, 1, 105, 1, 106, 1, 107, - 1, 108, 1, 109, 1, 110, 1, 111, 1, 112, 1, 113, - 1, 114, 1, 115, 1, 116, 1, 117, 1, 118, 1, 119, - 1, 120, 1, 121, 1, 122, 2, 188, 3, 1, 224, 1, - 225, 1, 226, 1, 227, 1, 228, 1, 229, 1, 230, 1, - 231, 1, 232, 1, 233, 1, 234, 1, 235, 1, 236, 1, - 237, 1, 238, 1, 239, 1, 240, 1, 241, 1, 242, 1, - 243, 1, 244, 1, 245, 1, 246, 1, 248, 1, 249, 1, - 250, 1, 251, 1, 252, 1, 253, 1, 254, 5, 115, 0, - 0, 0, 115, 2, 1, 1, 2, 3, 1, 2, 5, 1, - 2, 7, 1, 2, 9, 1, 2, 11, 1, 2, 13, 1, - 2, 15, 1, 2, 17, 1, 2, 19, 1, 2, 21, 1, - 2, 23, 1, 2, 25, 1, 2, 27, 1, 2, 29, 1, - 2, 31, 1, 2, 33, 1, 2, 35, 1, 2, 37, 1, - 2, 39, 1, 2, 41, 1, 2, 43, 1, 2, 45, 1, - 2, 47, 1, 6, 105, 0, 0, 0, 7, 3, 2, 51, - 1, 2, 53, 1, 2, 55, 1, 2, 58, 1, 2, 60, - 1, 2, 62, 1, 2, 64, 1, 2, 66, 1, 2, 68, - 1, 2, 70, 1, 2, 72, 1, 5, 188, 2, 0, 0, - 110, 2, 75, 1, 2, 77, 1, 2, 79, 1, 2, 81, - 1, 2, 83, 1, 2, 85, 1, 2, 87, 1, 2, 89, - 1, 2, 91, 1, 2, 93, 1, 2, 95, 1, 2, 97, - 1, 2, 99, 1, 2, 101, 1, 2, 103, 1, 2, 105, - 1, 2, 107, 1, 2, 109, 1, 2, 111, 1, 2, 113, - 1, 2, 115, 1, 2, 117, 1, 2, 119, 1, 1, 255, - 2, 122, 1, 2, 124, 1, 2, 126, 1, 2, 83, 2, - 2, 131, 1, 2, 133, 1, 2, 84, 2, 2, 136, 1, - 2, 86, 2, 2, 87, 2, 2, 140, 1, 2, 221, 1, - 2, 89, 2, 2, 91, 2, 2, 146, 1, 2, 96, 2, - 2, 99, 2, 2, 105, 2, 2, 104, 2, 2, 153, 1, - 2, 111, 2, 2, 114, 2, 2, 117, 2, 2, 161, 1, - 2, 163, 1, 2, 165, 1, 2, 128, 2, 2, 168, 1, - 2, 131, 2, 2, 173, 1, 2, 136, 2, 2, 176, 1, - 2, 138, 2, 2, 139, 2, 2, 180, 1, 2, 182, 1, - 2, 146, 2, 2, 185, 1, 2, 189, 1, 2, 198, 1, - 2, 201, 1, 2, 204, 1, 2, 206, 1, 2, 208, 1, - 2, 210, 1, 2, 212, 1, 2, 214, 1, 2, 216, 1, - 2, 218, 1, 2, 220, 1, 2, 223, 1, 2, 225, 1, - 2, 227, 1, 2, 229, 1, 2, 231, 1, 2, 233, 1, - 2, 235, 1, 2, 237, 1, 2, 239, 1, 6, 106, 0, - 0, 0, 12, 3, 2, 243, 1, 2, 245, 1, 2, 149, - 1, 2, 191, 1, 2, 249, 1, 2, 251, 1, 2, 253, - 1, 2, 255, 1, 2, 1, 2, 2, 3, 2, 2, 5, - 2, 2, 7, 2, 2, 9, 2, 2, 11, 2, 2, 13, - 2, 2, 15, 2, 2, 17, 2, 2, 19, 2, 2, 21, - 2, 2, 23, 2, 2, 25, 2, 2, 27, 2, 2, 29, - 2, 2, 31, 2, 2, 158, 1, 2, 35, 2, 2, 37, - 2, 2, 39, 2, 2, 41, 2, 2, 43, 2, 2, 45, - 2, 2, 47, 2, 2, 49, 2, 2, 51, 2, 2, 185, - 3, 6, 32, 0, 0, 0, 185, 3, 2, 172, 3, 2, - 173, 3, 2, 174, 3, 2, 175, 3, 2, 204, 3, 2, - 205, 3, 2, 206, 3, 10, 185, 3, 0, 0, 8, 3, - 0, 0, 1, 3, 2, 177, 3, 2, 178, 3, 2, 179, - 3, 2, 180, 3, 2, 181, 3, 2, 182, 3, 2, 183, - 3, 2, 184, 3, 2, 186, 3, 2, 187, 3, 2, 189, - 3, 2, 190, 3, 2, 191, 3, 2, 192, 3, 2, 193, - 3, 2, 195, 3, 2, 196, 3, 2, 197, 3, 2, 198, - 3, 2, 199, 3, 2, 200, 3, 2, 201, 3, 2, 202, - 3, 2, 203, 3, 10, 197, 3, 0, 0, 8, 3, 0, - 0, 1, 3, 2, 217, 3, 2, 219, 3, 2, 221, 3, - 2, 223, 3, 2, 225, 3, 2, 227, 3, 2, 229, 3, - 2, 231, 3, 2, 233, 3, 2, 235, 3, 2, 237, 3, - 2, 239, 3, 2, 80, 4, 2, 81, 4, 2, 82, 4, - 2, 83, 4, 2, 84, 4, 2, 85, 4, 2, 86, 4, - 2, 87, 4, 2, 88, 4, 2, 89, 4, 2, 90, 4, - 2, 91, 4, 2, 92, 4, 2, 93, 4, 2, 94, 4, - 2, 95, 4, 2, 48, 4, 2, 49, 4, 2, 50, 4, - 2, 51, 4, 2, 52, 4, 2, 53, 4, 2, 54, 4, - 2, 55, 4, 2, 56, 4, 2, 57, 4, 2, 58, 4, - 2, 59, 4, 2, 60, 4, 2, 61, 4, 2, 62, 4, - 2, 63, 4, 2, 64, 4, 2, 65, 4, 2, 66, 4, - 2, 67, 4, 2, 68, 4, 2, 69, 4, 2, 70, 4, - 2, 71, 4, 2, 72, 4, 2, 73, 4, 2, 74, 4, - 2, 75, 4, 2, 76, 4, 2, 77, 4, 2, 78, 4, - 2, 79, 4, 2, 97, 4, 2, 99, 4, 2, 101, 4, - 2, 103, 4, 2, 105, 4, 2, 107, 4, 2, 109, 4, - 2, 111, 4, 2, 113, 4, 2, 115, 4, 2, 117, 4, - 2, 119, 4, 2, 121, 4, 2, 123, 4, 2, 125, 4, - 2, 127, 4, 2, 129, 4, 2, 139, 4, 2, 141, 4, - 2, 143, 4, 2, 145, 4, 2, 147, 4, 2, 149, 4, - 2, 151, 4, 2, 153, 4, 2, 155, 4, 2, 157, 4, - 2, 159, 4, 2, 161, 4, 2, 163, 4, 2, 165, 4, - 2, 167, 4, 2, 169, 4, 2, 171, 4, 2, 173, 4, - 2, 175, 4, 2, 177, 4, 2, 179, 4, 2, 181, 4, - 2, 183, 4, 2, 185, 4, 2, 187, 4, 2, 189, 4, - 2, 191, 4, 2, 194, 4, 2, 196, 4, 2, 198, 4, - 2, 200, 4, 2, 202, 4, 2, 204, 4, 2, 206, 4, - 2, 209, 4, 2, 211, 4, 2, 213, 4, 2, 215, 4, - 2, 217, 4, 2, 219, 4, 2, 221, 4, 2, 223, 4, - 2, 225, 4, 2, 227, 4, 2, 229, 4, 2, 231, 4, - 2, 233, 4, 2, 235, 4, 2, 237, 4, 2, 239, 4, - 2, 241, 4, 2, 243, 4, 2, 245, 4, 2, 249, 4, - 2, 1, 5, 2, 3, 5, 2, 5, 5, 2, 7, 5, - 2, 9, 5, 2, 11, 5, 2, 13, 5, 2, 15, 5, - 2, 97, 5, 2, 98, 5, 2, 99, 5, 2, 100, 5, - 2, 101, 5, 2, 102, 5, 2, 103, 5, 2, 104, 5, - 2, 105, 5, 2, 106, 5, 2, 107, 5, 2, 108, 5, - 2, 109, 5, 2, 110, 5, 2, 111, 5, 2, 112, 5, - 2, 113, 5, 2, 114, 5, 2, 115, 5, 2, 116, 5, - 2, 117, 5, 2, 118, 5, 2, 119, 5, 2, 120, 5, - 2, 121, 5, 2, 122, 5, 2, 123, 5, 2, 124, 5, - 2, 125, 5, 2, 126, 5, 2, 127, 5, 2, 128, 5, - 2, 129, 5, 2, 130, 5, 2, 131, 5, 2, 132, 5, - 2, 133, 5, 2, 134, 5, 6, 101, 5, 0, 0, 130, - 5, 2, 1, 30, 2, 3, 30, 2, 5, 30, 2, 7, - 30, 2, 9, 30, 2, 11, 30, 2, 13, 30, 2, 15, - 30, 2, 17, 30, 2, 19, 30, 2, 21, 30, 2, 23, - 30, 2, 25, 30, 2, 27, 30, 2, 29, 30, 2, 31, - 30, 2, 33, 30, 2, 35, 30, 2, 37, 30, 2, 39, - 30, 2, 41, 30, 2, 43, 30, 2, 45, 30, 2, 47, - 30, 2, 49, 30, 2, 51, 30, 2, 53, 30, 2, 55, - 30, 2, 57, 30, 2, 59, 30, 2, 61, 30, 2, 63, - 30, 2, 65, 30, 2, 67, 30, 2, 69, 30, 2, 71, - 30, 2, 73, 30, 2, 75, 30, 2, 77, 30, 2, 79, - 30, 2, 81, 30, 2, 83, 30, 2, 85, 30, 2, 87, - 30, 2, 89, 30, 2, 91, 30, 2, 93, 30, 2, 95, - 30, 2, 97, 30, 2, 99, 30, 2, 101, 30, 2, 103, - 30, 2, 105, 30, 2, 107, 30, 2, 109, 30, 2, 111, - 30, 2, 113, 30, 2, 115, 30, 2, 117, 30, 2, 119, - 30, 2, 121, 30, 2, 123, 30, 2, 125, 30, 2, 127, - 30, 2, 129, 30, 2, 131, 30, 2, 133, 30, 2, 135, - 30, 2, 137, 30, 2, 139, 30, 2, 141, 30, 2, 143, - 30, 2, 145, 30, 2, 147, 30, 2, 149, 30, 6, 104, - 0, 0, 0, 49, 3, 6, 116, 0, 0, 0, 8, 3, - 6, 119, 0, 0, 0, 10, 3, 6, 121, 0, 0, 0, - 10, 3, 6, 97, 0, 0, 0, 190, 2, 2, 161, 30, - 2, 163, 30, 2, 165, 30, 2, 167, 30, 2, 169, 30, - 2, 171, 30, 2, 173, 30, 2, 175, 30, 2, 177, 30, - 2, 179, 30, 2, 181, 30, 2, 183, 30, 2, 185, 30, - 2, 187, 30, 2, 189, 30, 2, 191, 30, 2, 193, 30, - 2, 195, 30, 2, 197, 30, 2, 199, 30, 2, 201, 30, - 2, 203, 30, 2, 205, 30, 2, 207, 30, 2, 209, 30, - 2, 211, 30, 2, 213, 30, 2, 215, 30, 2, 217, 30, - 2, 219, 30, 2, 221, 30, 2, 223, 30, 2, 225, 30, - 2, 227, 30, 2, 229, 30, 2, 231, 30, 2, 233, 30, - 2, 235, 30, 2, 237, 30, 2, 239, 30, 2, 241, 30, - 2, 243, 30, 2, 245, 30, 2, 247, 30, 2, 249, 30, - 2, 0, 31, 2, 1, 31, 2, 2, 31, 2, 3, 31, - 2, 4, 31, 2, 5, 31, 2, 6, 31, 2, 7, 31, - 2, 16, 31, 2, 17, 31, 2, 18, 31, 2, 19, 31, - 2, 20, 31, 2, 21, 31, 2, 32, 31, 2, 33, 31, - 2, 34, 31, 2, 35, 31, 2, 36, 31, 2, 37, 31, - 2, 38, 31, 2, 39, 31, 2, 48, 31, 2, 49, 31, - 2, 50, 31, 2, 51, 31, 2, 52, 31, 2, 53, 31, - 2, 54, 31, 2, 55, 31, 2, 64, 31, 2, 65, 31, - 2, 66, 31, 2, 67, 31, 2, 68, 31, 2, 69, 31, - 6, 197, 3, 0, 0, 19, 3, 10, 197, 3, 0, 0, - 19, 3, 0, 0, 0, 3, 10, 197, 3, 0, 0, 19, - 3, 0, 0, 1, 3, 10, 197, 3, 0, 0, 19, 3, - 0, 0, 66, 3, 2, 81, 31, 2, 83, 31, 2, 85, - 31, 2, 87, 31, 2, 96, 31, 2, 97, 31, 2, 98, - 31, 2, 99, 31, 2, 100, 31, 2, 101, 31, 2, 102, - 31, 2, 103, 31, 6, 0, 31, 0, 0, 185, 3, 6, - 1, 31, 0, 0, 185, 3, 6, 2, 31, 0, 0, 185, - 3, 6, 3, 31, 0, 0, 185, 3, 6, 4, 31, 0, - 0, 185, 3, 6, 5, 31, 0, 0, 185, 3, 6, 6, - 31, 0, 0, 185, 3, 6, 7, 31, 0, 0, 185, 3, - 6, 32, 31, 0, 0, 185, 3, 6, 33, 31, 0, 0, - 185, 3, 6, 34, 31, 0, 0, 185, 3, 6, 35, 31, - 0, 0, 185, 3, 6, 36, 31, 0, 0, 185, 3, 6, - 37, 31, 0, 0, 185, 3, 6, 38, 31, 0, 0, 185, - 3, 6, 39, 31, 0, 0, 185, 3, 6, 96, 31, 0, - 0, 185, 3, 6, 97, 31, 0, 0, 185, 3, 6, 98, - 31, 0, 0, 185, 3, 6, 99, 31, 0, 0, 185, 3, - 6, 100, 31, 0, 0, 185, 3, 6, 101, 31, 0, 0, - 185, 3, 6, 102, 31, 0, 0, 185, 3, 6, 103, 31, - 0, 0, 185, 3, 6, 112, 31, 0, 0, 185, 3, 6, - 177, 3, 0, 0, 185, 3, 6, 172, 3, 0, 0, 185, - 3, 6, 177, 3, 0, 0, 66, 3, 10, 177, 3, 0, - 0, 66, 3, 0, 0, 185, 3, 2, 176, 31, 2, 177, - 31, 2, 112, 31, 2, 113, 31, 6, 116, 31, 0, 0, - 185, 3, 6, 183, 3, 0, 0, 185, 3, 6, 174, 3, - 0, 0, 185, 3, 6, 183, 3, 0, 0, 66, 3, 10, - 183, 3, 0, 0, 66, 3, 0, 0, 185, 3, 2, 114, - 31, 2, 115, 31, 2, 116, 31, 2, 117, 31, 10, 185, - 3, 0, 0, 8, 3, 0, 0, 0, 3, 6, 185, 3, - 0, 0, 66, 3, 10, 185, 3, 0, 0, 8, 3, 0, - 0, 66, 3, 2, 208, 31, 2, 209, 31, 2, 118, 31, - 2, 119, 31, 10, 197, 3, 0, 0, 8, 3, 0, 0, - 0, 3, 6, 193, 3, 0, 0, 19, 3, 6, 197, 3, - 0, 0, 66, 3, 10, 197, 3, 0, 0, 8, 3, 0, - 0, 66, 3, 2, 224, 31, 2, 225, 31, 2, 122, 31, - 2, 123, 31, 2, 229, 31, 6, 124, 31, 0, 0, 185, - 3, 6, 201, 3, 0, 0, 185, 3, 6, 206, 3, 0, - 0, 185, 3, 6, 201, 3, 0, 0, 66, 3, 10, 201, - 3, 0, 0, 66, 3, 0, 0, 185, 3, 2, 120, 31, - 2, 121, 31, 2, 124, 31, 2, 125, 31, 5, 114, 0, - 0, 0, 115, 5, 176, 0, 0, 0, 99, 5, 176, 0, - 0, 0, 102, 5, 110, 0, 0, 0, 111, 5, 115, 0, - 0, 0, 109, 9, 116, 0, 0, 0, 101, 0, 0, 0, - 108, 5, 116, 0, 0, 0, 109, 2, 112, 33, 2, 113, - 33, 2, 114, 33, 2, 115, 33, 2, 116, 33, 2, 117, - 33, 2, 118, 33, 2, 119, 33, 2, 120, 33, 2, 121, - 33, 2, 122, 33, 2, 123, 33, 2, 124, 33, 2, 125, - 33, 2, 126, 33, 2, 127, 33, 2, 208, 36, 2, 209, - 36, 2, 210, 36, 2, 211, 36, 2, 212, 36, 2, 213, - 36, 2, 214, 36, 2, 215, 36, 2, 216, 36, 2, 217, - 36, 2, 218, 36, 2, 219, 36, 2, 220, 36, 2, 221, - 36, 2, 222, 36, 2, 223, 36, 2, 224, 36, 2, 225, - 36, 2, 226, 36, 2, 227, 36, 2, 228, 36, 2, 229, - 36, 2, 230, 36, 2, 231, 36, 2, 232, 36, 2, 233, - 36, 9, 104, 0, 0, 0, 112, 0, 0, 0, 97, 5, - 97, 0, 0, 0, 117, 5, 111, 0, 0, 0, 118, 5, - 112, 0, 0, 0, 97, 5, 110, 0, 0, 0, 97, 5, - 188, 3, 0, 0, 97, 5, 109, 0, 0, 0, 97, 5, - 107, 0, 0, 0, 97, 5, 107, 0, 0, 0, 98, 5, - 109, 0, 0, 0, 98, 5, 103, 0, 0, 0, 98, 5, - 112, 0, 0, 0, 102, 5, 110, 0, 0, 0, 102, 5, - 188, 3, 0, 0, 102, 5, 104, 0, 0, 0, 122, 9, - 107, 0, 0, 0, 104, 0, 0, 0, 122, 9, 109, 0, - 0, 0, 104, 0, 0, 0, 122, 9, 103, 0, 0, 0, - 104, 0, 0, 0, 122, 9, 116, 0, 0, 0, 104, 0, - 0, 0, 122, 9, 107, 0, 0, 0, 112, 0, 0, 0, - 97, 9, 109, 0, 0, 0, 112, 0, 0, 0, 97, 9, - 103, 0, 0, 0, 112, 0, 0, 0, 97, 5, 112, 0, - 0, 0, 118, 5, 110, 0, 0, 0, 118, 5, 188, 3, - 0, 0, 118, 5, 109, 0, 0, 0, 118, 5, 107, 0, - 0, 0, 118, 5, 112, 0, 0, 0, 119, 5, 110, 0, - 0, 0, 119, 5, 188, 3, 0, 0, 119, 5, 109, 0, - 0, 0, 119, 5, 107, 0, 0, 0, 119, 6, 107, 0, - 0, 0, 201, 3, 6, 109, 0, 0, 0, 201, 3, 5, - 98, 0, 0, 0, 113, 13, 99, 0, 0, 0, 21, 34, - 0, 0, 107, 0, 0, 0, 103, 9, 99, 0, 0, 0, - 111, 0, 0, 0, 46, 5, 100, 0, 0, 0, 98, 5, - 103, 0, 0, 0, 121, 5, 104, 0, 0, 0, 112, 5, - 107, 0, 0, 0, 107, 5, 107, 0, 0, 0, 109, 5, - 112, 0, 0, 0, 104, 9, 112, 0, 0, 0, 112, 0, - 0, 0, 109, 5, 112, 0, 0, 0, 114, 5, 115, 0, - 0, 0, 118, 5, 119, 0, 0, 0, 98, 5, 102, 0, - 0, 0, 102, 5, 102, 0, 0, 0, 105, 5, 102, 0, - 0, 0, 108, 9, 102, 0, 0, 0, 102, 0, 0, 0, - 105, 9, 102, 0, 0, 0, 102, 0, 0, 0, 108, 5, - 115, 0, 0, 0, 116, 6, 116, 5, 0, 0, 118, 5, - 6, 116, 5, 0, 0, 101, 5, 6, 116, 5, 0, 0, - 107, 5, 6, 126, 5, 0, 0, 118, 5, 6, 116, 5, - 0, 0, 109, 5, 2, 65, 255, 2, 66, 255, 2, 67, - 255, 2, 68, 255, 2, 69, 255, 2, 70, 255, 2, 71, - 255, 2, 72, 255, 2, 73, 255, 2, 74, 255, 2, 75, - 255, 2, 76, 255, 2, 77, 255, 2, 78, 255, 2, 79, - 255, 2, 80, 255, 2, 81, 255, 2, 82, 255, 2, 83, - 255, 2, 84, 255, 2, 85, 255, 2, 86, 255, 2, 87, - 255, 2, 88, 255, 2, 89, 255, 2, 90, 255, 3, 40, - 4, 1, 3, 41, 4, 1, 3, 42, 4, 1, 3, 43, - 4, 1, 3, 44, 4, 1, 3, 45, 4, 1, 3, 46, - 4, 1, 3, 47, 4, 1, 3, 48, 4, 1, 3, 49, - 4, 1, 3, 50, 4, 1, 3, 51, 4, 1, 3, 52, - 4, 1, 3, 53, 4, 1, 3, 54, 4, 1, 3, 55, - 4, 1, 3, 56, 4, 1, 3, 57, 4, 1, 3, 58, - 4, 1, 3, 59, 4, 1, 3, 60, 4, 1, 3, 61, - 4, 1, 3, 62, 4, 1, 3, 63, 4, 1, 3, 64, - 4, 1, 3, 65, 4, 1, 3, 66, 4, 1, 3, 67, - 4, 1, 3, 68, 4, 1, 3, 69, 4, 1, 3, 70, - 4, 1, 3, 71, 4, 1, 3, 72, 4, 1, 3, 73, - 4, 1, 3, 74, 4, 1, 3, 75, 4, 1, 3, 76, - 4, 1, 3, 77, 4, 1, -}; - -static const unsigned short nameprep_id11_prohibited_imap[] = { - 68, 196, 196, 324, 196, 196, 196, 452, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 708, 196, 196, 580, 836, 836, 836, 836, - 836, 836, 836, 836, 0, 1, 0, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 3, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 0, 0, 6, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 5, 0,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0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, -}; - -static const struct { - unsigned char bm[16]; -} nameprep_id11_prohibited_bitmap[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 255,255,255,255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, - }}, - {{ - 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 255,199, 0, 0, 0,255, 0, 0, 0, 0, 0,128, 14,252, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 15, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 7, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, - }}, - {{ - 2, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255, - }}, -}; - -static const unsigned short nameprep_id11_unassigned_imap[] = { - 68, 196, 324, 452, 580, 708, 708, 836, - 964, 964, 1092, 1220, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 1476, 708, 708, 1348, 964, 964, 964, 964, - 964, 964, 964, 964, 0, 0, 0, 0, - 1, 2, 3, 4, 0, 5, 6, 7, - 8, 9, 10, 11, 12, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 0, 0, 0, - 36, 37, 38, 39, 40, 41, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 0, 42, 43, 44, 45, 46, 47, 48, - 0, 0, 0, 49, 50, 51, 0, 0, - 52, 53, 54, 55, 0, 0, 0, 0, - 0, 0, 12, 12, 12, 12, 12, 12, - 12, 56, 0, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 66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0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 70, 12, 71, 72, 0, 0, 73, 74, - 75, 76, 35, 77, 12, 12, 12, 12, - 12, 12, 78, 12, 79, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 0, 80, 81, 82, - 12, 12, 12, 12, 83, 84, 85, 0, - 0, 86, 0, 87, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 88, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 89, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 0, 0, 0, 0, - 90, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 88, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 88, 91, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, -}; - -static const struct { - unsigned char bm[16]; -} nameprep_id11_unassigned_bitmap[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 2, 0,240,255,255,255, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0,128,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0, 0,207,187, - }}, - {{ - 15, 40, 0, 0, 4, 0, 0, 0, 0,128, 0, 0, 0, 0,128,255, - }}, - {{ - 128, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0,192,252, - }}, - {{ - 0, 0,255,255,255,255, 1, 0, 0, 0,128, 1, 1, 0, 0, 0, - }}, - {{ - 0,249, 1, 0, 4, 0, 0, 4,224,255, 0, 0, 0,248,224,255, - }}, - {{ - 255,239,255,119, 1, 0, 0,248, 0, 0,192,255, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0,128, - }}, - {{ - 0, 64, 0, 0, 0,224, 0, 0, 0,248,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0,252,255,255,255,255,255,255,255,255,255, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 17, 0, 0, 0, 0, 0, 0, 12, 0,192,224, 0, 0, 0,254,255, - }}, - {{ - 17, 96, 6, 0, 0, 2, 58, 44, 96,198,127, 79, 48, 0, 0,248, - }}, - {{ - 27,120, 6, 0, 0, 2,146, 44,120,198,255,161, 63, 0,224,255, - }}, - {{ - 17, 80, 4, 0, 0, 2, 18, 12, 64,196,254,255, 62, 0,255,255, - }}, - {{ - 17, 96, 6, 0, 0, 2, 50, 12,112,198, 63, 79, 60, 0,254,255, - }}, - {{ - 19, 56,194, 41,231, 56, 64, 60, 56,194,127,255,127, 0,248,255, - }}, - {{ - 17, 32, 2, 0, 0, 2, 16, 60, 32,194,159,255, 60, 0,255,255, - }}, - {{ - 19, 32, 2, 0, 0, 2, 16, 60, 32,194,159,191, 60, 0,255,255, - }}, - {{ - 19, 32, 2, 0, 0, 2, 0, 60, 48,194,127,255, 60, 0,255,255, - }}, - {{ - 19, 0,128, 3, 0, 0, 4,208,128,123,160, 0,255,255,227,255, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0,120, 0, 0, 0,240,255,255,255,255, - }}, - {{ - 105,218, 15, 1, 81, 19, 0,196,160,192, 0,204,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,248, 1, 0, - }}, - {{ - 0,240, 0, 1, 0, 0, 0, 32, 0, 96,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 4, 9, 56,252, 0, 0, 0,252,255,255,255,255, - }}, - {{ - 255,255,255,255, 0, 0, 0, 0,192,255, 0, 0, 0, 0, 0,246, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, - }}, - {{ - 128, 0, 0, 0, 0, 0, 0, 0,128,194,128,194, 0, 0, 0, 0, - }}, - {{ - 128,194, 0, 0, 0,128,194,128,194,128,128, 0, 0,128, 0, 0, - }}, - {{ - 0,128,194,128, 0, 0, 0, 0,128, 0, 0,248, 1, 0, 0,224, - }}, - {{ - 255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,255, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255, - }}, - {{ - 0, 0, 0,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,255, - }}, - {{ - 0, 32,224,255, 0, 0,128,255, 0, 0,240,255, 0, 32,242,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 0,252,255,255, - }}, - {{ - 0,128, 0,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, - }}, - {{ - 0, 0, 0, 0, 0,252,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, - }}, - {{ - 0, 0,192,192, 0, 0, 0, 0,192,192, 0, 85, 0, 0, 0,192, - }}, - {{ - 0, 0, 0, 0, 0, 0, 32, 0, 32, 0, 48, 16, 0, 0, 35,128, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,127,240, 3, 12, 0, - }}, - {{ - 0,128,255,255, 0, 0,252,255,255,255, 0, 0, 0,248,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 24, 0,240, 7, 0, 0, 0, 0, 0, - }}, - {{ - 240,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,128,255,255,255, 0,248,255,255, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, - }}, - {{ - 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, - }}, - {{ - 0,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 33, 12, 0, 0, 0, 1, 0, 0, 0, 80,184,128, 1, 0, 0, 0, - }}, - {{ - 0, 0,224, 0, 0, 0, 1,128,255,255, 0, 0, 0,240, 0, 0, - }}, - {{ - 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255,255,255, 0,240, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0,128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 31, 0, 0, 0, 0,224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0,128, 0, 0, 0, 0, 0,255,255,255,255,255,255,255, 0, 0, - }}, - {{ - 0, 0, 0,224, 0, 0, 0, 0,240,255, 1, 0, 0, 0, 0,112, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 0, 0, 0, 0, 0,128, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 7, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0, 0, 0,128, - }}, - {{ - 0, 0, 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0,224, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,240,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0,248,255,255, - }}, - {{ - 128,255, 7, 31, 0, 0,128,160, 36, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0,252,255,255,255, 7, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 3, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0,224, - }}, - {{ - 0, 0,255,255,240,255, 0, 0,128, 1, 8, 0,128,240, 32, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0,128, 3, 3, 3,227,128,128,255, 1, - }}, - {{ - 0, 0, 0,128,240,255, 0, 0, 0,248,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,192, 0, 0, 0, 0,192,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255, - }}, - {{ - 0, 0, 0, 0,128, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 32,155, 33, 0, 20, 18, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 64, 24, 32, 32, 0, 0, 0,132,160, 3, 2, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 63, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255, - }}, - {{ - 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 253,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; - -static const unsigned short nameprep_id11_bidi_imap[] = { - 272, 400, 528, 656, 784, 912, 912, 912, - 912, 1040, 1168, 912, 912, 1296, 912, 1424, - 1552, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1808, 1680, 1680, - 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 1936, 1680, 1680, 1680, 1680, 2064, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, - 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 2192, - 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 2192, - 0, 0, 1, 1, 0, 2, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 5, 6, 4, 4, 7, 8, 9, - 0, 0, 0, 10, 11, 12, 13, 14, - 4, 4, 4, 4, 15, 4, 13, 16, - 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 29, 30, 31, - 32, 33, 0, 0, 29, 34, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, - 39, 51, 41, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 60, - 61, 64, 65, 60, 66, 67, 68, 69, - 20, 70, 71, 0, 72, 73, 74, 0, - 75, 76, 77, 78, 79, 80, 81, 0, - 4, 82, 83, 0, 0, 4, 84, 85, - 4, 4, 86, 4, 4, 87, 4, 88, - 89, 4, 90, 4, 91, 92, 93, 13, - 92, 4, 94, 95, 0, 4, 4, 96, - 20, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 97, 1, 4, 4, 98, - 99, 100, 101, 102, 4, 103, 104, 105, - 106, 4, 4, 83, 4, 107, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 4, 4, 4, 4, 108, 4, 4, 88, - 109, 4, 110, 111, 4, 112, 113, 114, - 115, 0, 0, 116, 0, 0, 0, 0, - 117, 118, 119, 4, 120, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 121, 4, 122, 123, 0, 0, 0, - 0, 0, 0, 0, 124, 4, 4, 105, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, - }}, - {{ - 0, 0, 2, 0, 0, 2, 2, 0, 0, 2, 2, 2, 2, 0, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, - }}, - {{ - 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, - }}, - {{ - 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, -}; - -static const unsigned char nameprep_id11_bidi_data[] = { - idn_biditype_others, - idn_biditype_r_al, - idn_biditype_l, -}; - diff --git a/netwerk/dns/nsIDNService.cpp b/netwerk/dns/nsIDNService.cpp index 49beecbb3..31ba12b4c 100644 --- a/netwerk/dns/nsIDNService.cpp +++ b/netwerk/dns/nsIDNService.cpp @@ -17,7 +17,6 @@ #include "nsISupportsPrimitives.h" #include "punycode.h" -#ifdef IDNA2008 // Currently we use the non-transitional processing option -- see // http://unicode.org/reports/tr46/ // To switch to transitional processing, change the value of this flag @@ -27,7 +26,6 @@ const bool kIDNA2008_TransitionalProcessing = false; #include "ICUUtils.h" #include "unicode/uscript.h" -#endif using namespace mozilla::unicode; @@ -136,32 +134,19 @@ nsIDNService::nsIDNService() : mShowPunycode(false) , mIDNUseWhitelist(false) { -#ifdef IDNA2008 uint32_t IDNAOptions = UIDNA_CHECK_BIDI | UIDNA_CHECK_CONTEXTJ; if (!kIDNA2008_TransitionalProcessing) { IDNAOptions |= UIDNA_NONTRANSITIONAL_TO_UNICODE; } UErrorCode errorCode = U_ZERO_ERROR; mIDNA = uidna_openUTS46(IDNAOptions, &errorCode); -#else - if (idn_success != idn_nameprep_create(nullptr, &mNamePrepHandle)) - mNamePrepHandle = nullptr; - - mNormalizer = do_GetService(NS_UNICODE_NORMALIZER_CONTRACTID); - /* member initializers and constructor code */ -#endif } nsIDNService::~nsIDNService() { -#ifdef IDNA2008 uidna_close(mIDNA); -#else - idn_nameprep_destroy(mNamePrepHandle); -#endif } -#ifdef IDNA2008 nsresult nsIDNService::IDNA2008ToUnicode(const nsACString& input, nsAString& output) { @@ -226,7 +211,6 @@ nsIDNService::IDNA2008StringPrep(const nsAString& input, return rv; } -#endif NS_IMETHODIMP nsIDNService::ConvertUTF8toACE(const nsACString & input, nsACString & ace) { @@ -486,21 +470,6 @@ static nsresult utf16ToUcs4(const nsAString& in, return NS_OK; } -#ifndef IDNA2008 -static void ucs4toUtf16(const uint32_t *in, nsAString& out) -{ - while (*in) { - if (!IS_IN_BMP(*in)) { - out.Append((char16_t) H_SURROGATE(*in)); - out.Append((char16_t) L_SURROGATE(*in)); - } - else - out.Append((char16_t) *in); - in++; - } -} -#endif - static nsresult punycode(const nsAString& in, nsACString& out) { uint32_t ucs4Buf[kMaxDNSNodeLen + 1]; @@ -551,74 +520,12 @@ static nsresult punycode(const nsAString& in, nsACString& out) // any unassigned Unicode points and if any are found return an error. // This is described in section 7. // +// => All this is handled by ICU's StringPrep(). +// nsresult nsIDNService::stringPrep(const nsAString& in, nsAString& out, stringPrepFlag flag) { -#ifdef IDNA2008 return IDNA2008StringPrep(in, out, flag); -#else - if (!mNamePrepHandle || !mNormalizer) - return NS_ERROR_FAILURE; - - uint32_t ucs4Buf[kMaxDNSNodeLen + 1]; - uint32_t ucs4Len; - nsresult rv = utf16ToUcs4(in, ucs4Buf, kMaxDNSNodeLen, &ucs4Len); - NS_ENSURE_SUCCESS(rv, rv); - - // map - idn_result_t idn_err; - - uint32_t namePrepBuf[kMaxDNSNodeLen * 3]; // map up to three characters - idn_err = idn_nameprep_map(mNamePrepHandle, (const uint32_t *) ucs4Buf, - (uint32_t *) namePrepBuf, kMaxDNSNodeLen * 3); - NS_ENSURE_TRUE(idn_err == idn_success, NS_ERROR_MALFORMED_URI); - - nsAutoString namePrepStr; - ucs4toUtf16(namePrepBuf, namePrepStr); - if (namePrepStr.Length() >= kMaxDNSNodeLen) - return NS_ERROR_MALFORMED_URI; - - // normalize - nsAutoString normlizedStr; - rv = mNormalizer->NormalizeUnicodeNFKC(namePrepStr, normlizedStr); - if (normlizedStr.Length() >= kMaxDNSNodeLen) - return NS_ERROR_MALFORMED_URI; - - // set the result string - out.Assign(normlizedStr); - - if (flag == eStringPrepIgnoreErrors) { - return NS_OK; - } - - // prohibit - const uint32_t *found = nullptr; - idn_err = idn_nameprep_isprohibited(mNamePrepHandle, - (const uint32_t *) ucs4Buf, &found); - if (idn_err != idn_success || found) { - rv = NS_ERROR_MALFORMED_URI; - } else { - // check bidi - idn_err = idn_nameprep_isvalidbidi(mNamePrepHandle, - (const uint32_t *) ucs4Buf, &found); - if (idn_err != idn_success || found) { - rv = NS_ERROR_MALFORMED_URI; - } else if (flag == eStringPrepForUI) { - // check unassigned code points - idn_err = idn_nameprep_isunassigned(mNamePrepHandle, - (const uint32_t *) ucs4Buf, &found); - if (idn_err != idn_success || found) { - rv = NS_ERROR_MALFORMED_URI; - } - } - } - - if (flag == eStringPrepForDNS && NS_FAILED(rv)) { - out.Truncate(); - } - - return rv; -#endif } nsresult nsIDNService::stringPrepAndACE(const nsAString& in, nsACString& out, @@ -709,31 +616,8 @@ nsresult nsIDNService::decodeACE(const nsACString& in, nsACString& out, } nsAutoString utf16; -#ifdef IDNA2008 nsresult result = IDNA2008ToUnicode(in, utf16); NS_ENSURE_SUCCESS(result, result); -#else - // RFC 3490 - 4.2 ToUnicode - // The ToUnicode output never contains more code points than its input. - punycode_uint output_length = in.Length() - kACEPrefixLen + 1; - auto *output = new punycode_uint[output_length]; - NS_ENSURE_TRUE(output, NS_ERROR_OUT_OF_MEMORY); - - enum punycode_status status = punycode_decode(in.Length() - kACEPrefixLen, - PromiseFlatCString(in).get() + kACEPrefixLen, - &output_length, - output, - nullptr); - if (status != punycode_success) { - delete [] output; - return NS_ERROR_MALFORMED_URI; - } - - // UCS4 -> UTF8 - output[output_length] = 0; - ucs4toUtf16(output, utf16); - delete [] output; -#endif if (flag != eStringPrepForUI || isLabelSafe(utf16)) { CopyUTF16toUTF8(utf16, out); } else { diff --git a/netwerk/dns/nsIDNService.h b/netwerk/dns/nsIDNService.h index 19aa94da0..82a05021d 100644 --- a/netwerk/dns/nsIDNService.h +++ b/netwerk/dns/nsIDNService.h @@ -12,12 +12,7 @@ #include "nsUnicodeScriptCodes.h" #include "nsWeakReference.h" -#ifdef IDNA2008 #include "unicode/uidna.h" -#else -#include "nsIUnicodeNormalizer.h" -#include "nsIDNKitInterface.h" -#endif #include "nsString.h" @@ -151,7 +146,6 @@ private: bool illegalScriptCombo(mozilla::unicode::Script script, int32_t& savedScript); -#ifdef IDNA2008 /** * Convert a DNS label from ASCII to Unicode using IDNA2008 */ @@ -164,10 +158,6 @@ private: stringPrepFlag flag); UIDNA* mIDNA; -#else - idn_nameprep_t mNamePrepHandle; - nsCOMPtr mNormalizer; -#endif nsXPIDLString mIDNBlacklist; /** -- cgit v1.2.3