Ada 4.1.1
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
ada::idna Namespace Reference

Namespaces

namespace  deflate
namespace  table_blob
namespace  detail

Typedefs

using range_pair_ptr = const uint32_t(*)[2]

Enumerations

enum  direction : uint8_t {
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE ,
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE ,
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE
}
enum class  joining_type : uint8_t {
  U , C , D , L ,
  R , T , U , C ,
  D , L , R , T ,
  U , C , D , L ,
  R , T
}
enum  direction : uint8_t {
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE ,
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE ,
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE
}
enum class  joining_type : uint8_t {
  U , C , D , L ,
  R , T , U , C ,
  D , L , R , T ,
  U , C , D , L ,
  R , T
}
enum  direction : uint8_t {
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE ,
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE ,
  NONE , BN , CS , ES ,
  ON , EN , L , R ,
  NSM , AL , AN , ET ,
  WS , RLO , LRO , PDF ,
  RLE , RLI , FSI , PDI ,
  LRI , B , S , LRE
}
enum class  joining_type : uint8_t {
  U , C , D , L ,
  R , T , U , C ,
  D , L , R , T ,
  U , C , D , L ,
  R , T
}

Functions

bool valid_name_code_point (char32_t code_point, bool first)
void ascii_map (char *input, size_t length)
std::u32string map (std::u32string_view input)
bool map (std::u32string_view input, std::u32string &out)
bool is_already_nfc (std::u32string_view input) noexcept
bool normalize (std::u32string &input)
bool punycode_to_utf32 (std::string_view input, std::u32string &out)
bool verify_punycode (std::string_view input)
bool utf32_to_punycode (std::u32string_view input, std::string &out)
std::string to_ascii (std::string_view ut8_string)
bool to_ascii (std::string_view ut8_string, std::string &out)
bool contains_forbidden_domain_code_point (std::string_view ascii_string)
bool constexpr is_ascii (std::u32string_view view)
bool constexpr is_ascii (std::string_view view)
std::string to_unicode (std::string_view input)
bool to_unicode (std::string_view input, std::string &out)
size_t utf8_to_utf32 (const char *buf, size_t len, char32_t *utf32_output)
size_t utf8_length_from_utf32 (const char32_t *buf, size_t len)
size_t utf32_length_from_utf8 (const char *buf, size_t len)
size_t utf32_to_utf8 (const char32_t *buf, size_t len, char *utf8_output)
bool is_label_valid (std::u32string_view label)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_idna_stage1, table_blob::count_idna_stage1, 2)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_idna_stage2, table_blob::count_idna_stage2, 2)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_idna_bool_blocks, table_blob::count_idna_bool_blocks, 8)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_idna_utf8_mappings, table_blob::count_idna_utf8_mappings, 1)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_decomposition_index, table_blob::count_decomposition_index, 1)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_decomposition_block, table_blob::count_decomposition_block, 2)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_decomposition_data, table_blob::count_decomposition_data, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_ccc_index, table_blob::count_ccc_index, 1)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_ccc_block, table_blob::count_ccc_block, 1)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_composition_index, table_blob::count_composition_index, 1)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_composition_block, table_blob::count_composition_block, 2)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_composition_data, table_blob::count_composition_data, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_id_continue_flat, table_blob::count_id_continue_flat, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_id_start_flat, table_blob::count_id_start_flat, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_dir_start, table_blob::count_dir_start, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_dir_final, table_blob::count_dir_final, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_dir_value, table_blob::count_dir_value, 1)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_combining_flat, table_blob::count_combining_flat, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_joining_start, table_blob::count_joining_start, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_joining_final, table_blob::count_joining_final, 4)
 ADA_IDNA_SECTION_IN_BOUNDS (table_blob::off_joining_value, table_blob::count_joining_value, 1)
uint32_t crc32_ieee (const uint8_t *data, size_t len) noexcept
bool tables_are_ready () noexcept
bool ensure_tables () noexcept
const uint16_t * decomposition_block_row (uint8_t bi) noexcept
const uint8_t * ccc_block_row (uint8_t bi) noexcept
const uint16_t * composition_block_row (uint8_t bi) noexcept
static uint16_t idna_lookup (uint32_t cp) noexcept
static char32_t utf8_next (const uint8_t *&ptr) noexcept
static size_t utf8_count_codepoints (const uint8_t *ptr) noexcept
static size_t canonical_decomp_length (char32_t current_character) noexcept
std::pair< bool, size_t > compute_decomposition_length (const std::u32string_view input) noexcept
void decompose (std::u32string &input, size_t additional_elements)
uint8_t get_ccc (char32_t c) noexcept
void sort_marks (std::u32string &input)
void decompose_nfc (std::u32string &input)
static bool has_composition (const uint16_t *composition, char32_t second) noexcept
static bool would_compose (std::u32string_view input) noexcept
static uint8_t trailing_ccc (char32_t c) noexcept
void compose (std::u32string &input)
static bool decomposition_is_not_nfc (char32_t previous, char32_t c) noexcept
static constexpr int32_t char_to_digit_value (char value)
static constexpr char digit_to_char (int32_t digit)
static constexpr int32_t adapt (int32_t d, int32_t n, bool firsttime)
static size_t find_range (const uint32_t *start, const uint32_t *last, size_t count, uint32_t code_point) noexcept
static direction find_direction (uint32_t code_point) noexcept
static joining_type find_joining_type (uint32_t code_point) noexcept
static bool is_contextj_valid (std::u32string_view label) noexcept
static size_t find_last_not_of_nsm (const std::u32string_view label) noexcept
static bool is_rtl_label (const std::u32string_view label) noexcept
static bool label_contains_rtl (std::u32string_view label) noexcept
static bool check_label (const std::u32string_view label, bool bidi_domain)
bool is_forbidden_domain_code_point (const char c) noexcept
static void from_ascii_to_ascii (std::string_view ut8_string, std::string &out)
static void append_ascii_label (std::string &out, std::u32string_view label)
static bool is_ace_prefix (std::u32string_view label) noexcept
static bool mapped_domain_is_bidi (std::u32string_view mapped)
static bool ascii_label_fails_bidi_domain (std::string_view label)
static bool utf8_domain_is_bidi (std::string_view input)
constexpr bool is_ascii_letter (char32_t c) noexcept
constexpr bool is_ascii_letter_or_digit (char32_t c) noexcept
static uint16_t idna_lookup (uint32_t cp) noexcept
static char32_t utf8_next (const uint8_t *&ptr) noexcept
static size_t utf8_count_codepoints (const uint8_t *ptr) noexcept
static size_t canonical_decomp_length (char32_t current_character) noexcept
static bool has_composition (const uint16_t *composition, char32_t second) noexcept
static bool would_compose (std::u32string_view input) noexcept
static uint8_t trailing_ccc (char32_t c) noexcept
static bool decomposition_is_not_nfc (char32_t previous, char32_t c) noexcept
static constexpr int32_t char_to_digit_value (char value)
static constexpr char digit_to_char (int32_t digit)
static constexpr int32_t adapt (int32_t d, int32_t n, bool firsttime)
static void from_ascii_to_ascii (std::string_view ut8_string, std::string &out)
static void append_ascii_label (std::string &out, std::u32string_view label)
static bool is_ace_prefix (std::u32string_view label) noexcept
static bool mapped_domain_is_bidi (std::u32string_view mapped)
static bool ascii_label_fails_bidi_domain (std::string_view label)
static bool utf8_domain_is_bidi (std::string_view input)
static size_t find_range (const uint32_t *start, const uint32_t *last, size_t count, uint32_t code_point) noexcept
static direction find_direction (uint32_t code_point) noexcept
static joining_type find_joining_type (uint32_t code_point) noexcept
static bool is_contextj_valid (std::u32string_view label) noexcept
static size_t find_last_not_of_nsm (const std::u32string_view label) noexcept
static bool is_rtl_label (const std::u32string_view label) noexcept
static bool label_contains_rtl (std::u32string_view label) noexcept
static bool check_label (const std::u32string_view label, bool bidi_domain)
static uint16_t idna_lookup (uint32_t cp) noexcept
static char32_t utf8_next (const uint8_t *&ptr) noexcept
static size_t utf8_count_codepoints (const uint8_t *ptr) noexcept
static size_t canonical_decomp_length (char32_t current_character) noexcept
static bool has_composition (const uint16_t *composition, char32_t second) noexcept
static bool would_compose (std::u32string_view input) noexcept
static uint8_t trailing_ccc (char32_t c) noexcept
static bool decomposition_is_not_nfc (char32_t previous, char32_t c) noexcept
static constexpr int32_t char_to_digit_value (char value)
static constexpr char digit_to_char (int32_t digit)
static constexpr int32_t adapt (int32_t d, int32_t n, bool firsttime)
static size_t find_range (const uint32_t *start, const uint32_t *last, size_t count, uint32_t code_point) noexcept
static direction find_direction (uint32_t code_point) noexcept
static joining_type find_joining_type (uint32_t code_point) noexcept
static bool is_contextj_valid (std::u32string_view label) noexcept
static size_t find_last_not_of_nsm (const std::u32string_view label) noexcept
static bool is_rtl_label (const std::u32string_view label) noexcept
static bool label_contains_rtl (std::u32string_view label) noexcept
static bool check_label (const std::u32string_view label, bool bidi_domain)
static void from_ascii_to_ascii (std::string_view ut8_string, std::string &out)
static void append_ascii_label (std::string &out, std::u32string_view label)
static bool is_ace_prefix (std::u32string_view label) noexcept
static bool mapped_domain_is_bidi (std::u32string_view mapped)
static bool ascii_label_fails_bidi_domain (std::string_view label)
static bool utf8_domain_is_bidi (std::string_view input)

Variables

constexpr size_t max_domain_input_bytes = 16384
const uint16_t * idna_stage1 = nullptr
const uint16_t * idna_stage2 = nullptr
const uint64_t * idna_bool_blocks = nullptr
const uint8_t * idna_utf8_mappings = nullptr
const uint8_t * decomposition_index = nullptr
const uint16_t * decomposition_block_flat = nullptr
const char32_t * decomposition_data = nullptr
const uint8_t * ccc_index = nullptr
const uint8_t * ccc_block_flat = nullptr
const uint8_t * composition_index = nullptr
const uint16_t * composition_block_flat = nullptr
const char32_t * composition_data = nullptr
range_pair_ptr id_continue = nullptr
range_pair_ptr id_start = nullptr
const uint32_t * dir_start = nullptr
const uint32_t * dir_final = nullptr
const uint8_t * dir_value = nullptr
range_pair_ptr combining_ranges = nullptr
const uint32_t * joining_start = nullptr
const uint32_t * joining_final = nullptr
const uint8_t * joining_value = nullptr
constexpr size_t id_continue_count = table_blob::id_continue_count
constexpr size_t id_start_count = table_blob::id_start_count
constexpr size_t dir_table_count = table_blob::dir_table_count
constexpr size_t joining_table_count = table_blob::joining_table_count
constexpr size_t combining_range_count
constexpr size_t idna_utf8_mappings_size
constexpr size_t decomposition_data_size
constexpr size_t composition_data_size
constexpr size_t kDecompBlockCols
constexpr size_t kCccBlockCols = table_blob::ccc_block_cols
constexpr size_t kCompBlockCols
constexpr size_t kDecompBlockRows = table_blob::decomposition_block_rows
constexpr size_t kCccBlockRows = table_blob::ccc_block_rows
constexpr size_t kCompBlockRows = table_blob::composition_block_rows
constexpr uint8_t kTablesUninit = 0
constexpr uint8_t kTablesInProgress = 1
constexpr uint8_t kTablesReady = 2
constexpr uint8_t kTablesFailed = 3
std::atomic< uint8_t > tables_init_state {kTablesUninit}
uint8_t * tables_buffer = nullptr
constexpr uint64_t kTablesSpinLimit = 1'000'000'000ull
constexpr uint32_t IDNA_BLOCK_BITS = 6u
constexpr uint32_t IDNA_BLOCK_SIZE = 64u
constexpr uint32_t IDNA_BLOCK_MASK = 63u
constexpr uint16_t IDNA_VALID = 0xFFFF
constexpr uint16_t IDNA_DISALLOWED = 0xFFFE
constexpr uint16_t IDNA_IGNORED = 0x0000
constexpr uint16_t IDNA_BOOL_FLAG = 0x8000
constexpr uint32_t IDNA_LOW_RANGE_END = 0x0003FC40
constexpr uint32_t IDNA_HIGH_IGNORED_START = 0x000E0100
constexpr uint32_t IDNA_HIGH_IGNORED_END = 0x000E01F0
constexpr char32_t hangul_sbase = 0xAC00
constexpr char32_t hangul_tbase = 0x11A7
constexpr char32_t hangul_vbase = 0x1161
constexpr char32_t hangul_lbase = 0x1100
constexpr char32_t hangul_lcount = 19
constexpr char32_t hangul_vcount = 21
constexpr char32_t hangul_tcount = 28
constexpr char32_t hangul_ncount = hangul_vcount * hangul_tcount
constexpr char32_t hangul_scount
constexpr int32_t base = 36
constexpr int32_t tmin = 1
constexpr int32_t tmax = 26
constexpr int32_t skew = 38
constexpr int32_t damp = 700
constexpr int32_t initial_bias = 72
constexpr uint32_t initial_n = 128
static constexpr uint8_t is_forbidden_domain_code_point_table []
static constexpr uint8_t is_forbidden_domain_code_point_table []
static constexpr uint8_t is_forbidden_domain_code_point_table []

Typedef Documentation

◆ range_pair_ptr

using ada::idna::range_pair_ptr = const uint32_t(*)[2]

Definition at line 4886 of file ada_idna.cpp.

Enumeration Type Documentation

◆ direction [1/3]

enum ada::idna::direction : uint8_t
Enumerator
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 

Definition at line 6041 of file ada_idna.cpp.

◆ direction [2/3]

enum ada::idna::direction : uint8_t
Enumerator
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 

Definition at line 11 of file validity.cpp.

◆ direction [3/3]

enum ada::idna::direction : uint8_t
Enumerator
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 
NONE 
BN 
CS 
ES 
ON 
EN 
L 
R 
NSM 
AL 
AN 
ET 
WS 
RLO 
LRO 
PDF 
RLE 
RLI 
FSI 
PDI 
LRI 
B 
S 
LRE 

Definition at line 6041 of file ada_idna.cpp.

◆ joining_type [1/3]

enum class ada::idna::joining_type : uint8_t
strong
Enumerator
U 
C 
D 
L 
R 
T 
U 
C 
D 
L 
R 
T 
U 
C 
D 
L 
R 
T 

Definition at line 6070 of file ada_idna.cpp.

◆ joining_type [2/3]

enum class ada::idna::joining_type : uint8_t
strong
Enumerator
U 
C 
D 
L 
R 
T 
U 
C 
D 
L 
R 
T 
U 
C 
D 
L 
R 
T 

Definition at line 40 of file validity.cpp.

◆ joining_type [3/3]

enum class ada::idna::joining_type : uint8_t
strong
Enumerator
U 
C 
D 
L 
R 
T 
U 
C 
D 
L 
R 
T 
U 
C 
D 
L 
R 
T 

Definition at line 6070 of file ada_idna.cpp.

Function Documentation

◆ ADA_IDNA_SECTION_IN_BOUNDS() [1/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [2/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [3/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [4/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [5/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [6/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [7/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [8/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [9/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [10/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [11/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [12/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [13/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [14/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [15/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [16/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [17/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [18/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [19/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [20/21]

◆ ADA_IDNA_SECTION_IN_BOUNDS() [21/21]

◆ adapt() [1/3]

constexpr int32_t ada::idna::adapt ( int32_t d,
int32_t n,
bool firsttime )
staticconstexpr

Definition at line 5804 of file ada_idna.cpp.

References base, damp, skew, tmax, and tmin.

Referenced by punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().

◆ adapt() [2/3]

constexpr int32_t ada::idna::adapt ( int32_t d,
int32_t n,
bool firsttime )
staticconstexpr

Definition at line 25 of file punycode.cpp.

References base, damp, skew, tmax, and tmin.

◆ adapt() [3/3]

constexpr int32_t ada::idna::adapt ( int32_t d,
int32_t n,
bool firsttime )
staticconstexpr

Definition at line 5804 of file ada_idna.cpp.

References base, damp, skew, tmax, and tmin.

◆ append_ascii_label() [1/3]

void ada::idna::append_ascii_label ( std::string & out,
std::u32string_view label )
static

Definition at line 6496 of file ada_idna.cpp.

Referenced by to_ascii().

◆ append_ascii_label() [2/3]

void ada::idna::append_ascii_label ( std::string & out,
std::u32string_view label )
static

Definition at line 72 of file to_ascii.cpp.

◆ append_ascii_label() [3/3]

void ada::idna::append_ascii_label ( std::string & out,
std::u32string_view label )
static

Definition at line 6496 of file ada_idna.cpp.

◆ ascii_label_fails_bidi_domain() [1/3]

bool ada::idna::ascii_label_fails_bidi_domain ( std::string_view label)
static

Definition at line 6772 of file ada_idna.cpp.

References check_label().

Referenced by to_unicode().

◆ ascii_label_fails_bidi_domain() [2/3]

bool ada::idna::ascii_label_fails_bidi_domain ( std::string_view label)
static

Definition at line 23 of file to_unicode.cpp.

References check_label().

◆ ascii_label_fails_bidi_domain() [3/3]

bool ada::idna::ascii_label_fails_bidi_domain ( std::string_view label)
static

Definition at line 6772 of file ada_idna.cpp.

References check_label().

◆ ascii_map()

void ada::idna::ascii_map ( char * input,
size_t length )

Definition at line 5219 of file ada_idna.cpp.

Referenced by from_ascii_to_ascii(), and LLVMFuzzerTestOneInput().

◆ canonical_decomp_length() [1/3]

size_t ada::idna::canonical_decomp_length ( char32_t current_character)
staticnoexcept

Definition at line 5359 of file ada_idna.cpp.

References decomposition_block_row(), decomposition_index, hangul_sbase, and hangul_scount.

Referenced by trailing_ccc().

◆ canonical_decomp_length() [2/3]

size_t ada::idna::canonical_decomp_length ( char32_t current_character)
staticnoexcept

◆ canonical_decomp_length() [3/3]

size_t ada::idna::canonical_decomp_length ( char32_t current_character)
staticnoexcept

◆ ccc_block_row()

const uint8_t * ada::idna::ccc_block_row ( uint8_t bi)
inlinenoexcept

Definition at line 5082 of file ada_idna.cpp.

References ccc_block_flat, kCccBlockCols, and kCccBlockRows.

Referenced by get_ccc().

◆ char_to_digit_value() [1/3]

constexpr int32_t ada::idna::char_to_digit_value ( char value)
staticconstexpr

Definition at line 5794 of file ada_idna.cpp.

Referenced by punycode_to_utf32(), and verify_punycode().

◆ char_to_digit_value() [2/3]

constexpr int32_t ada::idna::char_to_digit_value ( char value)
staticconstexpr

Definition at line 15 of file punycode.cpp.

◆ char_to_digit_value() [3/3]

constexpr int32_t ada::idna::char_to_digit_value ( char value)
staticconstexpr

Definition at line 5794 of file ada_idna.cpp.

◆ check_label() [1/3]

bool ada::idna::check_label ( const std::u32string_view label,
bool bidi_domain )
static

◆ check_label() [2/3]

bool ada::idna::check_label ( const std::u32string_view label,
bool bidi_domain )
static

◆ check_label() [3/3]

bool ada::idna::check_label ( const std::u32string_view label,
bool bidi_domain )
static

◆ compose()

void ada::idna::compose ( std::u32string & input)

◆ composition_block_row()

const uint16_t * ada::idna::composition_block_row ( uint8_t bi)
inlinenoexcept

◆ compute_decomposition_length()

std::pair< bool, size_t > ada::idna::compute_decomposition_length ( const std::u32string_view input)
noexcept

◆ contains_forbidden_domain_code_point()

bool ada::idna::contains_forbidden_domain_code_point ( std::string_view ascii_string)

Definition at line 6481 of file ada_idna.cpp.

References is_forbidden_domain_code_point().

Referenced by domain_to_ascii(), LLVMFuzzerTestOneInput(), TEST(), and TEST_F().

◆ crc32_ieee()

uint32_t ada::idna::crc32_ieee ( const uint8_t * data,
size_t len )
inlinenodiscardnoexcept

Definition at line 4938 of file ada_idna.cpp.

Referenced by ensure_tables().

◆ decompose()

void ada::idna::decompose ( std::u32string & input,
size_t additional_elements )

◆ decompose_nfc()

void ada::idna::decompose_nfc ( std::u32string & input)

Decompose the domain_name string to Unicode Normalization Form C.

See also
https://www.unicode.org/reports/tr46/#ProcessingStepDecompose

Definition at line 5477 of file ada_idna.cpp.

References compute_decomposition_length(), decompose(), and sort_marks().

Referenced by normalize().

◆ decomposition_block_row()

const uint16_t * ada::idna::decomposition_block_row ( uint8_t bi)
inlinenoexcept

◆ decomposition_is_not_nfc() [1/3]

bool ada::idna::decomposition_is_not_nfc ( char32_t previous,
char32_t c )
staticnoexcept

◆ decomposition_is_not_nfc() [2/3]

bool ada::idna::decomposition_is_not_nfc ( char32_t previous,
char32_t c )
staticnoexcept

◆ decomposition_is_not_nfc() [3/3]

bool ada::idna::decomposition_is_not_nfc ( char32_t previous,
char32_t c )
staticnoexcept

◆ digit_to_char() [1/3]

constexpr char ada::idna::digit_to_char ( int32_t digit)
staticconstexpr

Definition at line 5800 of file ada_idna.cpp.

Referenced by utf32_to_punycode().

◆ digit_to_char() [2/3]

constexpr char ada::idna::digit_to_char ( int32_t digit)
staticconstexpr

Definition at line 21 of file punycode.cpp.

◆ digit_to_char() [3/3]

constexpr char ada::idna::digit_to_char ( int32_t digit)
staticconstexpr

Definition at line 5800 of file ada_idna.cpp.

◆ ensure_tables()

bool ada::idna::ensure_tables ( )
inlinenodiscardnoexcept

Definition at line 4956 of file ada_idna.cpp.

References ccc_block_flat, ccc_index, combining_ranges, composition_block_flat, composition_data, composition_index, ada::idna::table_blob::compressed, ada::idna::table_blob::compressed_size, ada::idna::detail::convert_table_blob_to_host_endian(), crc32_ieee(), decomposition_block_flat, decomposition_data, decomposition_index, dir_final, dir_start, dir_value, id_continue, id_start, idna_bool_blocks, idna_stage1, idna_stage2, idna_utf8_mappings, ada::idna::deflate::inflate_raw(), joining_final, joining_start, joining_value, kTablesFailed, kTablesInProgress, kTablesReady, kTablesSpinLimit, kTablesUninit, ada::idna::table_blob::off_ccc_block, ada::idna::table_blob::off_ccc_index, ada::idna::table_blob::off_combining_flat, ada::idna::table_blob::off_composition_block, ada::idna::table_blob::off_composition_data, ada::idna::table_blob::off_composition_index, ada::idna::table_blob::off_decomposition_block, ada::idna::table_blob::off_decomposition_data, ada::idna::table_blob::off_decomposition_index, ada::idna::table_blob::off_dir_final, ada::idna::table_blob::off_dir_start, ada::idna::table_blob::off_dir_value, ada::idna::table_blob::off_id_continue_flat, ada::idna::table_blob::off_id_start_flat, ada::idna::table_blob::off_idna_bool_blocks, ada::idna::table_blob::off_idna_stage1, ada::idna::table_blob::off_idna_stage2, ada::idna::table_blob::off_idna_utf8_mappings, ada::idna::table_blob::off_joining_final, ada::idna::table_blob::off_joining_start, ada::idna::table_blob::off_joining_value, tables_buffer, tables_init_state, ada::idna::table_blob::uncompressed_crc32, and ada::idna::table_blob::uncompressed_size.

Referenced by check_label(), is_already_nfc(), label_contains_rtl(), map(), normalize(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), and valid_name_code_point().

◆ find_direction() [1/3]

direction ada::idna::find_direction ( uint32_t code_point)
inlinestaticnoexcept

Definition at line 6098 of file ada_idna.cpp.

References dir_final, dir_start, dir_table_count, dir_value, and find_range().

Referenced by check_label(), find_last_not_of_nsm(), and is_rtl_label().

◆ find_direction() [2/3]

direction ada::idna::find_direction ( uint32_t code_point)
inlinestaticnoexcept

Definition at line 68 of file validity.cpp.

References dir_final, dir_start, dir_table_count, dir_value, and find_range().

◆ find_direction() [3/3]

direction ada::idna::find_direction ( uint32_t code_point)
inlinestaticnoexcept

Definition at line 6098 of file ada_idna.cpp.

References dir_final, dir_start, dir_table_count, dir_value, and find_range().

◆ find_joining_type() [1/3]

joining_type ada::idna::find_joining_type ( uint32_t code_point)
inlinestaticnoexcept

Definition at line 6105 of file ada_idna.cpp.

References find_range(), joining_final, joining_start, joining_table_count, joining_value, and U.

Referenced by is_contextj_valid().

◆ find_joining_type() [2/3]

joining_type ada::idna::find_joining_type ( uint32_t code_point)
inlinestaticnoexcept

Definition at line 75 of file validity.cpp.

References find_range(), joining_final, joining_start, joining_table_count, joining_value, and U.

◆ find_joining_type() [3/3]

joining_type ada::idna::find_joining_type ( uint32_t code_point)
inlinestaticnoexcept

Definition at line 6105 of file ada_idna.cpp.

References find_range(), joining_final, joining_start, joining_table_count, joining_value, and U.

◆ find_last_not_of_nsm() [1/3]

size_t ada::idna::find_last_not_of_nsm ( const std::u32string_view label)
inlinestaticnoexcept

Definition at line 6152 of file ada_idna.cpp.

References find_direction().

Referenced by check_label().

◆ find_last_not_of_nsm() [2/3]

size_t ada::idna::find_last_not_of_nsm ( const std::u32string_view label)
inlinestaticnoexcept

Definition at line 122 of file validity.cpp.

References find_direction().

◆ find_last_not_of_nsm() [3/3]

size_t ada::idna::find_last_not_of_nsm ( const std::u32string_view label)
inlinestaticnoexcept

Definition at line 6152 of file ada_idna.cpp.

References find_direction().

◆ find_range() [1/3]

size_t ada::idna::find_range ( const uint32_t * start,
const uint32_t * last,
size_t count,
uint32_t code_point )
inlinestaticnoexcept

Definition at line 6083 of file ada_idna.cpp.

Referenced by find_direction(), and find_joining_type().

◆ find_range() [2/3]

size_t ada::idna::find_range ( const uint32_t * start,
const uint32_t * last,
size_t count,
uint32_t code_point )
inlinestaticnoexcept

Definition at line 53 of file validity.cpp.

◆ find_range() [3/3]

size_t ada::idna::find_range ( const uint32_t * start,
const uint32_t * last,
size_t count,
uint32_t code_point )
inlinestaticnoexcept

Definition at line 6083 of file ada_idna.cpp.

◆ from_ascii_to_ascii() [1/3]

void ada::idna::from_ascii_to_ascii ( std::string_view ut8_string,
std::string & out )
static

Definition at line 6490 of file ada_idna.cpp.

References ascii_map().

Referenced by to_ascii().

◆ from_ascii_to_ascii() [2/3]

void ada::idna::from_ascii_to_ascii ( std::string_view ut8_string,
std::string & out )
static

Definition at line 66 of file to_ascii.cpp.

References ascii_map().

◆ from_ascii_to_ascii() [3/3]

void ada::idna::from_ascii_to_ascii ( std::string_view ut8_string,
std::string & out )
static

Definition at line 6490 of file ada_idna.cpp.

References ascii_map().

◆ get_ccc()

uint8_t ada::idna::get_ccc ( char32_t c)
noexcept

◆ has_composition() [1/3]

bool ada::idna::has_composition ( const uint16_t * composition,
char32_t second )
staticnoexcept

Definition at line 5491 of file ada_idna.cpp.

References composition_data, and composition_data_size.

Referenced by decomposition_is_not_nfc(), and would_compose().

◆ has_composition() [2/3]

bool ada::idna::has_composition ( const uint16_t * composition,
char32_t second )
staticnoexcept

Definition at line 158 of file normalization.cpp.

References composition_data, and composition_data_size.

◆ has_composition() [3/3]

bool ada::idna::has_composition ( const uint16_t * composition,
char32_t second )
staticnoexcept

Definition at line 5491 of file ada_idna.cpp.

References composition_data, and composition_data_size.

◆ idna_lookup() [1/3]

uint16_t ada::idna::idna_lookup ( uint32_t cp)
staticnoexcept

◆ idna_lookup() [2/3]

◆ idna_lookup() [3/3]

◆ is_ace_prefix() [1/3]

bool ada::idna::is_ace_prefix ( std::u32string_view label)
staticnoexcept

Definition at line 6506 of file ada_idna.cpp.

References U.

Referenced by mapped_domain_is_bidi(), and to_ascii().

◆ is_ace_prefix() [2/3]

bool ada::idna::is_ace_prefix ( std::u32string_view label)
staticnoexcept

Definition at line 82 of file to_ascii.cpp.

References U.

◆ is_ace_prefix() [3/3]

bool ada::idna::is_ace_prefix ( std::u32string_view label)
staticnoexcept

Definition at line 6506 of file ada_idna.cpp.

References U.

◆ is_already_nfc()

bool ada::idna::is_already_nfc ( std::u32string_view input)
nodiscardnoexcept

◆ is_ascii() [1/2]

bool constexpr ada::idna::is_ascii ( std::string_view view)
constexpr

Definition at line 6453 of file ada_idna.cpp.

◆ is_ascii() [2/2]

bool constexpr ada::idna::is_ascii ( std::u32string_view view)
constexpr

Definition at line 6444 of file ada_idna.cpp.

Referenced by LLVMFuzzerTestOneInput(), to_ascii(), to_unicode(), and utf8_domain_is_bidi().

◆ is_ascii_letter()

bool ada::idna::is_ascii_letter ( char32_t c)
constexprnoexcept

Definition at line 6963 of file ada_idna.cpp.

Referenced by valid_name_code_point().

◆ is_ascii_letter_or_digit()

bool ada::idna::is_ascii_letter_or_digit ( char32_t c)
constexprnoexcept

Definition at line 6967 of file ada_idna.cpp.

Referenced by valid_name_code_point().

◆ is_contextj_valid() [1/3]

bool ada::idna::is_contextj_valid ( std::u32string_view label)
inlinestaticnoexcept

Definition at line 6113 of file ada_idna.cpp.

References D, find_joining_type(), get_ccc(), L, R, T, and U.

Referenced by check_label().

◆ is_contextj_valid() [2/3]

bool ada::idna::is_contextj_valid ( std::u32string_view label)
inlinestaticnoexcept

Definition at line 83 of file validity.cpp.

References D, find_joining_type(), get_ccc(), L, R, T, and U.

◆ is_contextj_valid() [3/3]

bool ada::idna::is_contextj_valid ( std::u32string_view label)
inlinestaticnoexcept

Definition at line 6113 of file ada_idna.cpp.

References D, find_joining_type(), get_ccc(), L, R, T, and U.

◆ is_forbidden_domain_code_point()

bool ada::idna::is_forbidden_domain_code_point ( const char c)
inlinenoexcept

Definition at line 6477 of file ada_idna.cpp.

References is_forbidden_domain_code_point_table.

Referenced by contains_forbidden_domain_code_point().

◆ is_label_valid()

bool ada::idna::is_label_valid ( std::u32string_view label)

◆ is_rtl_label() [1/3]

bool ada::idna::is_rtl_label ( const std::u32string_view label)
inlinestaticnoexcept

Definition at line 6164 of file ada_idna.cpp.

References find_direction().

Referenced by check_label(), and label_contains_rtl().

◆ is_rtl_label() [2/3]

bool ada::idna::is_rtl_label ( const std::u32string_view label)
inlinestaticnoexcept

Definition at line 134 of file validity.cpp.

References find_direction().

◆ is_rtl_label() [3/3]

bool ada::idna::is_rtl_label ( const std::u32string_view label)
inlinestaticnoexcept

Definition at line 6164 of file ada_idna.cpp.

References find_direction().

◆ label_contains_rtl() [1/3]

bool ada::idna::label_contains_rtl ( std::u32string_view label)
inlinestaticnoexcept

Definition at line 6177 of file ada_idna.cpp.

References dir_final, dir_start, dir_value, ensure_tables(), and is_rtl_label().

Referenced by mapped_domain_is_bidi(), and utf8_domain_is_bidi().

◆ label_contains_rtl() [2/3]

bool ada::idna::label_contains_rtl ( std::u32string_view label)
inlinestaticnoexcept

Definition at line 147 of file validity.cpp.

References dir_final, dir_start, dir_value, ensure_tables(), and is_rtl_label().

◆ label_contains_rtl() [3/3]

bool ada::idna::label_contains_rtl ( std::u32string_view label)
inlinestaticnoexcept

Definition at line 6177 of file ada_idna.cpp.

References dir_final, dir_start, dir_value, ensure_tables(), and is_rtl_label().

◆ map() [1/2]

std::u32string ada::idna::map ( std::u32string_view input)

◆ map() [2/2]

bool ada::idna::map ( std::u32string_view input,
std::u32string & out )

◆ mapped_domain_is_bidi() [1/3]

bool ada::idna::mapped_domain_is_bidi ( std::u32string_view mapped)
static

Definition at line 6515 of file ada_idna.cpp.

References is_ace_prefix(), label_contains_rtl(), punycode_to_utf32(), and U.

Referenced by to_ascii().

◆ mapped_domain_is_bidi() [2/3]

bool ada::idna::mapped_domain_is_bidi ( std::u32string_view mapped)
static

Definition at line 91 of file to_ascii.cpp.

References is_ace_prefix(), label_contains_rtl(), punycode_to_utf32(), and U.

◆ mapped_domain_is_bidi() [3/3]

bool ada::idna::mapped_domain_is_bidi ( std::u32string_view mapped)
static

Definition at line 6515 of file ada_idna.cpp.

References is_ace_prefix(), label_contains_rtl(), punycode_to_utf32(), and U.

◆ normalize()

bool ada::idna::normalize ( std::u32string & input)
nodiscard

Normalize the characters according to IDNA (Unicode Normalization Form C).

See also
https://www.unicode.org/reports/tr46/#ProcessingStepNormalize

Definition at line 5744 of file ada_idna.cpp.

References compose(), composition_index, decompose_nfc(), decomposition_index, ensure_tables(), and is_already_nfc().

Referenced by LLVMFuzzerTestOneInput(), TEST(), TEST(), TEST(), to_ascii(), and to_unicode().

◆ punycode_to_utf32()

bool ada::idna::punycode_to_utf32 ( std::string_view input,
std::u32string & out )

◆ sort_marks()

void ada::idna::sort_marks ( std::u32string & input)

Definition at line 5461 of file ada_idna.cpp.

References get_ccc().

Referenced by decompose_nfc().

◆ tables_are_ready()

bool ada::idna::tables_are_ready ( )
inlinenodiscardnoexcept

Definition at line 4951 of file ada_idna.cpp.

References kTablesReady, and tables_init_state.

Referenced by is_already_nfc(), TEST(), and TEST().

◆ to_ascii() [1/2]

◆ to_ascii() [2/2]

◆ to_unicode() [1/2]

std::string ada::idna::to_unicode ( std::string_view input)

◆ to_unicode() [2/2]

bool ada::idna::to_unicode ( std::string_view input,
std::string & out )
nodiscard

◆ trailing_ccc() [1/3]

uint8_t ada::idna::trailing_ccc ( char32_t c)
staticnoexcept

◆ trailing_ccc() [2/3]

uint8_t ada::idna::trailing_ccc ( char32_t c)
staticnoexcept

◆ trailing_ccc() [3/3]

uint8_t ada::idna::trailing_ccc ( char32_t c)
staticnoexcept

◆ utf32_length_from_utf8()

size_t ada::idna::utf32_length_from_utf8 ( const char * buf,
size_t len )

◆ utf32_to_punycode()

bool ada::idna::utf32_to_punycode ( std::u32string_view input,
std::string & out )

Definition at line 5968 of file ada_idna.cpp.

References adapt(), base, digit_to_char(), initial_bias, initial_n, and tmax.

Referenced by LLVMFuzzerTestOneInput(), TEST_F(), and to_ascii().

◆ utf32_to_utf8()

size_t ada::idna::utf32_to_utf8 ( const char32_t * buf,
size_t len,
char * utf8_output )

Definition at line 151 of file ada_idna.cpp.

Referenced by LLVMFuzzerTestOneInput(), TEST_F(), and to_unicode().

◆ utf8_count_codepoints() [1/3]

size_t ada::idna::utf8_count_codepoints ( const uint8_t * ptr)
staticnoexcept

Definition at line 5201 of file ada_idna.cpp.

Referenced by map().

◆ utf8_count_codepoints() [2/3]

size_t ada::idna::utf8_count_codepoints ( const uint8_t * ptr)
staticnoexcept

Definition at line 65 of file mapping.cpp.

◆ utf8_count_codepoints() [3/3]

size_t ada::idna::utf8_count_codepoints ( const uint8_t * ptr)
staticnoexcept

Definition at line 5201 of file ada_idna.cpp.

◆ utf8_domain_is_bidi() [1/3]

bool ada::idna::utf8_domain_is_bidi ( std::string_view input)
static

◆ utf8_domain_is_bidi() [2/3]

bool ada::idna::utf8_domain_is_bidi ( std::string_view input)
static

◆ utf8_domain_is_bidi() [3/3]

bool ada::idna::utf8_domain_is_bidi ( std::string_view input)
static

◆ utf8_length_from_utf32()

size_t ada::idna::utf8_length_from_utf32 ( const char32_t * buf,
size_t len )

Definition at line 129 of file ada_idna.cpp.

Referenced by LLVMFuzzerTestOneInput(), TEST_F(), and to_unicode().

◆ utf8_next() [1/3]

char32_t ada::idna::utf8_next ( const uint8_t *& ptr)
staticnoexcept

Definition at line 5179 of file ada_idna.cpp.

Referenced by map().

◆ utf8_next() [2/3]

char32_t ada::idna::utf8_next ( const uint8_t *& ptr)
staticnoexcept

Definition at line 43 of file mapping.cpp.

◆ utf8_next() [3/3]

char32_t ada::idna::utf8_next ( const uint8_t *& ptr)
staticnoexcept

Definition at line 5179 of file ada_idna.cpp.

◆ utf8_to_utf32()

size_t ada::idna::utf8_to_utf32 ( const char * buf,
size_t len,
char32_t * utf32_output )

◆ valid_name_code_point()

bool ada::idna::valid_name_code_point ( char32_t code_point,
bool first )

◆ verify_punycode()

bool ada::idna::verify_punycode ( std::string_view input)

Definition at line 5890 of file ada_idna.cpp.

References adapt(), base, char_to_digit_value(), initial_bias, initial_n, tmax, and U.

Referenced by LLVMFuzzerTestOneInput().

◆ would_compose() [1/3]

bool ada::idna::would_compose ( std::u32string_view input)
staticnoexcept

◆ would_compose() [2/3]

bool ada::idna::would_compose ( std::u32string_view input)
staticnoexcept

◆ would_compose() [3/3]

bool ada::idna::would_compose ( std::u32string_view input)
staticnoexcept

Variable Documentation

◆ base

int32_t ada::idna::base = 36
constexpr

◆ ccc_block_flat

const uint8_t * ada::idna::ccc_block_flat = nullptr
inline

Definition at line 4878 of file ada_idna.cpp.

Referenced by ccc_block_row(), and ensure_tables().

◆ ccc_index

const uint8_t * ada::idna::ccc_index = nullptr
inline

Definition at line 4877 of file ada_idna.cpp.

Referenced by ensure_tables(), and get_ccc().

◆ combining_range_count

size_t ada::idna::combining_range_count
inlineconstexpr
Initial value:

Definition at line 4904 of file ada_idna.cpp.

Referenced by check_label().

◆ combining_ranges

range_pair_ptr ada::idna::combining_ranges = nullptr
inline

Definition at line 4895 of file ada_idna.cpp.

Referenced by check_label(), and ensure_tables().

◆ composition_block_flat

const uint16_t * ada::idna::composition_block_flat = nullptr
inline

Definition at line 4880 of file ada_idna.cpp.

Referenced by composition_block_row(), and ensure_tables().

◆ composition_data

const char32_t * ada::idna::composition_data = nullptr
inline

Definition at line 4881 of file ada_idna.cpp.

Referenced by compose(), ensure_tables(), and has_composition().

◆ composition_data_size

size_t ada::idna::composition_data_size
inlineconstexpr
Initial value:

Definition at line 4910 of file ada_idna.cpp.

Referenced by compose(), and has_composition().

◆ composition_index

const uint8_t * ada::idna::composition_index = nullptr
inline

◆ damp

int32_t ada::idna::damp = 700
constexpr

Definition at line 5790 of file ada_idna.cpp.

Referenced by adapt().

◆ decomposition_block_flat

const uint16_t * ada::idna::decomposition_block_flat = nullptr
inline

Definition at line 4875 of file ada_idna.cpp.

Referenced by decomposition_block_row(), and ensure_tables().

◆ decomposition_data

const char32_t * ada::idna::decomposition_data = nullptr
inline

Definition at line 4876 of file ada_idna.cpp.

Referenced by decompose(), decomposition_is_not_nfc(), ensure_tables(), and trailing_ccc().

◆ decomposition_data_size

size_t ada::idna::decomposition_data_size
inlineconstexpr
Initial value:

Definition at line 4908 of file ada_idna.cpp.

Referenced by decompose(), and decomposition_is_not_nfc().

◆ decomposition_index

const uint8_t * ada::idna::decomposition_index = nullptr
inline

◆ dir_final

const uint32_t * ada::idna::dir_final = nullptr
inline

Definition at line 4893 of file ada_idna.cpp.

Referenced by check_label(), ensure_tables(), find_direction(), and label_contains_rtl().

◆ dir_start

const uint32_t * ada::idna::dir_start = nullptr
inline

Definition at line 4892 of file ada_idna.cpp.

Referenced by check_label(), ensure_tables(), find_direction(), and label_contains_rtl().

◆ dir_table_count

size_t ada::idna::dir_table_count = table_blob::dir_table_count
inlineconstexpr

Definition at line 4902 of file ada_idna.cpp.

Referenced by find_direction().

◆ dir_value

const uint8_t * ada::idna::dir_value = nullptr
inline

Definition at line 4894 of file ada_idna.cpp.

Referenced by check_label(), ensure_tables(), find_direction(), and label_contains_rtl().

◆ hangul_lbase

char32_t ada::idna::hangul_lbase = 0x1100
constexpr

Definition at line 5347 of file ada_idna.cpp.

Referenced by compose(), decompose(), and would_compose().

◆ hangul_lcount

char32_t ada::idna::hangul_lcount = 19
constexpr

Definition at line 5348 of file ada_idna.cpp.

Referenced by compose(), and would_compose().

◆ hangul_ncount

char32_t ada::idna::hangul_ncount = hangul_vcount * hangul_tcount
constexpr

Definition at line 5351 of file ada_idna.cpp.

Referenced by decompose().

◆ hangul_sbase

char32_t ada::idna::hangul_sbase = 0xAC00
constexpr

◆ hangul_scount

char32_t ada::idna::hangul_scount
constexpr
Initial value:
=
constexpr char32_t hangul_tcount
constexpr char32_t hangul_lcount
constexpr char32_t hangul_vcount

Definition at line 5352 of file ada_idna.cpp.

Referenced by canonical_decomp_length(), compose(), compute_decomposition_length(), decompose(), decomposition_is_not_nfc(), and would_compose().

◆ hangul_tbase

char32_t ada::idna::hangul_tbase = 0x11A7
constexpr

Definition at line 5345 of file ada_idna.cpp.

Referenced by compose(), decompose(), and would_compose().

◆ hangul_tcount

char32_t ada::idna::hangul_tcount = 28
constexpr

Definition at line 5350 of file ada_idna.cpp.

Referenced by compose(), compute_decomposition_length(), decompose(), and would_compose().

◆ hangul_vbase

char32_t ada::idna::hangul_vbase = 0x1161
constexpr

Definition at line 5346 of file ada_idna.cpp.

Referenced by compose(), decompose(), and would_compose().

◆ hangul_vcount

char32_t ada::idna::hangul_vcount = 21
constexpr

Definition at line 5349 of file ada_idna.cpp.

Referenced by compose(), and would_compose().

◆ id_continue

range_pair_ptr ada::idna::id_continue = nullptr
inline

Definition at line 4888 of file ada_idna.cpp.

Referenced by ensure_tables(), TEST_F(), TEST_F(), and valid_name_code_point().

◆ id_continue_count

size_t ada::idna::id_continue_count = table_blob::id_continue_count
inlineconstexpr

Definition at line 4900 of file ada_idna.cpp.

Referenced by TEST_F(), TEST_F(), and valid_name_code_point().

◆ id_start

range_pair_ptr ada::idna::id_start = nullptr
inline

Definition at line 4889 of file ada_idna.cpp.

Referenced by ensure_tables(), TEST_F(), TEST_F(), and valid_name_code_point().

◆ id_start_count

size_t ada::idna::id_start_count = table_blob::id_start_count
inlineconstexpr

Definition at line 4901 of file ada_idna.cpp.

Referenced by TEST_F(), TEST_F(), and valid_name_code_point().

◆ IDNA_BLOCK_BITS

uint32_t ada::idna::IDNA_BLOCK_BITS = 6u
constexpr

Definition at line 5118 of file ada_idna.cpp.

Referenced by idna_lookup().

◆ IDNA_BLOCK_MASK

uint32_t ada::idna::IDNA_BLOCK_MASK = 63u
constexpr

Definition at line 5120 of file ada_idna.cpp.

Referenced by idna_lookup().

◆ IDNA_BLOCK_SIZE

uint32_t ada::idna::IDNA_BLOCK_SIZE = 64u
constexpr

Definition at line 5119 of file ada_idna.cpp.

Referenced by idna_lookup().

◆ idna_bool_blocks

const uint64_t * ada::idna::idna_bool_blocks = nullptr
inline

Definition at line 4870 of file ada_idna.cpp.

Referenced by ensure_tables(), and idna_lookup().

◆ IDNA_BOOL_FLAG

uint16_t ada::idna::IDNA_BOOL_FLAG = 0x8000
constexpr

Definition at line 5128 of file ada_idna.cpp.

Referenced by idna_lookup().

◆ IDNA_DISALLOWED

uint16_t ada::idna::IDNA_DISALLOWED = 0xFFFE
constexpr

Definition at line 5124 of file ada_idna.cpp.

Referenced by idna_lookup(), and map().

◆ IDNA_HIGH_IGNORED_END

uint32_t ada::idna::IDNA_HIGH_IGNORED_END = 0x000E01F0
constexpr

Definition at line 5139 of file ada_idna.cpp.

Referenced by idna_lookup().

◆ IDNA_HIGH_IGNORED_START

uint32_t ada::idna::IDNA_HIGH_IGNORED_START = 0x000E0100
constexpr

Definition at line 5138 of file ada_idna.cpp.

Referenced by idna_lookup().

◆ IDNA_IGNORED

uint16_t ada::idna::IDNA_IGNORED = 0x0000
constexpr

Definition at line 5125 of file ada_idna.cpp.

Referenced by idna_lookup().

◆ IDNA_LOW_RANGE_END

uint32_t ada::idna::IDNA_LOW_RANGE_END = 0x0003FC40
constexpr

Definition at line 5133 of file ada_idna.cpp.

Referenced by idna_lookup().

◆ idna_stage1

const uint16_t * ada::idna::idna_stage1 = nullptr
inline

Definition at line 4868 of file ada_idna.cpp.

Referenced by ensure_tables(), and idna_lookup().

◆ idna_stage2

const uint16_t * ada::idna::idna_stage2 = nullptr
inline

Definition at line 4869 of file ada_idna.cpp.

Referenced by ensure_tables(), and idna_lookup().

◆ idna_utf8_mappings

const uint8_t * ada::idna::idna_utf8_mappings = nullptr
inline

Definition at line 4871 of file ada_idna.cpp.

Referenced by ensure_tables(), and map().

◆ idna_utf8_mappings_size

size_t ada::idna::idna_utf8_mappings_size
inlineconstexpr
Initial value:

Definition at line 4906 of file ada_idna.cpp.

Referenced by map().

◆ IDNA_VALID

uint16_t ada::idna::IDNA_VALID = 0xFFFF
constexpr

Definition at line 5123 of file ada_idna.cpp.

Referenced by idna_lookup(), and map().

◆ initial_bias

int32_t ada::idna::initial_bias = 72
constexpr

Definition at line 5791 of file ada_idna.cpp.

Referenced by punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().

◆ initial_n

uint32_t ada::idna::initial_n = 128
constexpr

Definition at line 5792 of file ada_idna.cpp.

Referenced by punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().

◆ is_forbidden_domain_code_point_table [1/3]

uint8_t ada::idna::is_forbidden_domain_code_point_table[]
staticconstexpr
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 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, 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, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}

Definition at line 6462 of file ada_idna.cpp.

Referenced by is_forbidden_domain_code_point().

◆ is_forbidden_domain_code_point_table [2/3]

uint8_t ada::idna::is_forbidden_domain_code_point_table[]
staticconstexpr
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 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, 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, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}

Definition at line 38 of file to_ascii.cpp.

◆ is_forbidden_domain_code_point_table [3/3]

uint8_t ada::idna::is_forbidden_domain_code_point_table[]
staticconstexpr
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 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, 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, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}

Definition at line 6462 of file ada_idna.cpp.

◆ joining_final

const uint32_t * ada::idna::joining_final = nullptr
inline

Definition at line 4897 of file ada_idna.cpp.

Referenced by check_label(), ensure_tables(), and find_joining_type().

◆ joining_start

const uint32_t * ada::idna::joining_start = nullptr
inline

Definition at line 4896 of file ada_idna.cpp.

Referenced by check_label(), ensure_tables(), and find_joining_type().

◆ joining_table_count

size_t ada::idna::joining_table_count = table_blob::joining_table_count
inlineconstexpr

Definition at line 4903 of file ada_idna.cpp.

Referenced by find_joining_type().

◆ joining_value

const uint8_t * ada::idna::joining_value = nullptr
inline

Definition at line 4898 of file ada_idna.cpp.

Referenced by check_label(), ensure_tables(), and find_joining_type().

◆ kCccBlockCols

size_t ada::idna::kCccBlockCols = table_blob::ccc_block_cols
inlineconstexpr

Definition at line 4915 of file ada_idna.cpp.

Referenced by ccc_block_row().

◆ kCccBlockRows

size_t ada::idna::kCccBlockRows = table_blob::ccc_block_rows
inlineconstexpr

Definition at line 4919 of file ada_idna.cpp.

Referenced by ccc_block_row().

◆ kCompBlockCols

size_t ada::idna::kCompBlockCols
inlineconstexpr
Initial value:

Definition at line 4916 of file ada_idna.cpp.

Referenced by composition_block_row().

◆ kCompBlockRows

size_t ada::idna::kCompBlockRows = table_blob::composition_block_rows
inlineconstexpr

Definition at line 4920 of file ada_idna.cpp.

Referenced by composition_block_row().

◆ kDecompBlockCols

size_t ada::idna::kDecompBlockCols
inlineconstexpr
Initial value:

Definition at line 4913 of file ada_idna.cpp.

Referenced by decomposition_block_row().

◆ kDecompBlockRows

size_t ada::idna::kDecompBlockRows = table_blob::decomposition_block_rows
inlineconstexpr

Definition at line 4918 of file ada_idna.cpp.

Referenced by decomposition_block_row().

◆ kTablesFailed

uint8_t ada::idna::kTablesFailed = 3
inlineconstexpr

Definition at line 4926 of file ada_idna.cpp.

Referenced by ensure_tables().

◆ kTablesInProgress

uint8_t ada::idna::kTablesInProgress = 1
inlineconstexpr

Definition at line 4924 of file ada_idna.cpp.

Referenced by ensure_tables().

◆ kTablesReady

uint8_t ada::idna::kTablesReady = 2
inlineconstexpr

Definition at line 4925 of file ada_idna.cpp.

Referenced by ensure_tables(), and tables_are_ready().

◆ kTablesSpinLimit

uint64_t ada::idna::kTablesSpinLimit = 1'000'000'000ull
inlineconstexpr

Definition at line 4935 of file ada_idna.cpp.

Referenced by ensure_tables().

◆ kTablesUninit

uint8_t ada::idna::kTablesUninit = 0
inlineconstexpr

Definition at line 4923 of file ada_idna.cpp.

Referenced by ensure_tables().

◆ max_domain_input_bytes

size_t ada::idna::max_domain_input_bytes = 16384
inlineconstexpr

Definition at line 12 of file limits.h.

Referenced by TEST(), TEST(), TEST(), to_ascii(), and to_unicode().

◆ skew

int32_t ada::idna::skew = 38
constexpr

Definition at line 5789 of file ada_idna.cpp.

Referenced by adapt().

◆ tables_buffer

uint8_t * ada::idna::tables_buffer = nullptr
inline

Definition at line 4932 of file ada_idna.cpp.

Referenced by ensure_tables().

◆ tables_init_state

std::atomic< uint8_t > ada::idna::tables_init_state {kTablesUninit}
inline

Definition at line 4928 of file ada_idna.cpp.

Referenced by ensure_tables(), and tables_are_ready().

◆ tmax

int32_t ada::idna::tmax = 26
constexpr

Definition at line 5788 of file ada_idna.cpp.

Referenced by adapt(), punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().

◆ tmin

int32_t ada::idna::tmin = 1
constexpr

Definition at line 5787 of file ada_idna.cpp.

Referenced by adapt().