• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[
2  "This resource is focused on highlighting issues with UTS #46 ToASCII",
3  {
4    "comment": "Label with hyphens in 3rd and 4th position",
5    "input": "aa--",
6    "output": "aa--"
7  },
8  {
9    "input": "a†--",
10    "output": "xn--a---kp0a"
11  },
12  {
13    "input": "ab--c",
14    "output": "ab--c"
15  },
16  {
17    "comment": "Label with leading hyphen",
18    "input": "-x",
19    "output": "-x"
20  },
21  {
22    "input": "-†",
23    "output": "xn----xhn"
24  },
25  {
26    "input": "-x.xn--nxa",
27    "output": "-x.xn--nxa"
28  },
29  {
30    "input": "-x.β",
31    "output": "-x.xn--nxa"
32  },
33  {
34    "comment": "Label with trailing hyphen",
35    "input": "x-.xn--nxa",
36    "output": "x-.xn--nxa"
37  },
38  {
39    "input": "x-.β",
40    "output": "x-.xn--nxa"
41  },
42  {
43    "comment": "Empty labels",
44    "input": "x..xn--nxa",
45    "output": "x..xn--nxa"
46  },
47  {
48    "input": "x..β",
49    "output": "x..xn--nxa"
50  },
51  {
52    "comment": "Invalid Punycode",
53    "input": "xn--a",
54    "output": null
55  },
56  {
57    "input": "xn--a.xn--nxa",
58    "output": null
59  },
60  {
61    "input": "xn--a.β",
62    "output": null
63  },
64  {
65    "comment": "Valid Punycode",
66    "input": "xn--nxa.xn--nxa",
67    "output": "xn--nxa.xn--nxa"
68  },
69  {
70    "comment": "Mixed",
71    "input": "xn--nxa.β",
72    "output": "xn--nxa.xn--nxa"
73  },
74  {
75    "input": "ab--c.xn--nxa",
76    "output": "ab--c.xn--nxa"
77  },
78  {
79    "input": "ab--c.β",
80    "output": "ab--c.xn--nxa"
81  },
82  {
83    "comment": "CheckJoiners is true",
84    "input": "\u200D.example",
85    "output": null
86  },
87  {
88    "input": "xn--1ug.example",
89    "output": null
90  },
91  {
92    "comment": "CheckBidi is true",
93    "input": "يa",
94    "output": null
95  },
96  {
97    "input": "xn--a-yoc",
98    "output": null
99  },
100  {
101    "comment": "processing_option is Nontransitional_Processing",
102    "input": "ශ්‍රී",
103    "output": "xn--10cl1a0b660p"
104  },
105  {
106    "input": "نامه‌ای",
107    "output": "xn--mgba3gch31f060k"
108  },
109  {
110    "comment": "U+FFFD",
111    "input": "\uFFFD.com",
112    "output": null
113  },
114  {
115    "comment": "U+FFFD character encoded in Punycode",
116    "input": "xn--zn7c.com",
117    "output": null
118  },
119  {
120    "comment": "Label longer than 63 code points",
121    "input": "x01234567890123456789012345678901234567890123456789012345678901x",
122    "output": "x01234567890123456789012345678901234567890123456789012345678901x"
123  },
124  {
125    "input": "x01234567890123456789012345678901234567890123456789012345678901†",
126    "output": "xn--x01234567890123456789012345678901234567890123456789012345678901-6963b"
127  },
128  {
129    "input": "x01234567890123456789012345678901234567890123456789012345678901x.xn--nxa",
130    "output": "x01234567890123456789012345678901234567890123456789012345678901x.xn--nxa"
131  },
132  {
133    "input": "x01234567890123456789012345678901234567890123456789012345678901x.β",
134    "output": "x01234567890123456789012345678901234567890123456789012345678901x.xn--nxa"
135  },
136  {
137    "comment": "Domain excluding TLD longer than 253 code points",
138    "input": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.x",
139    "output": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.x"
140  },
141  {
142    "input": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.xn--nxa",
143    "output": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.xn--nxa"
144  },
145  {
146    "input": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.β",
147    "output": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.xn--nxa"
148  }
149]
150