From f8e9e53b4f547ebc4f926a6c4cd67fe8055a1db0 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 18 Jan 2026 23:51:44 -0800 Subject: [PATCH] pass toUnicodePass All 664 tests passed. --- generate.ts | 87 +++++- idna.zig | 188 ++++++++++++ licenses.txt | 3 + normalization.zig | 238 ++++++++++++++++ punycode.zig | 137 +++++++++ testv2.zig | 712 ++++++++++++++++++++++++++++++++++++++++++++++ zigmod.yml | 4 + 7 files changed, 1368 insertions(+), 1 deletion(-) create mode 100644 normalization.zig create mode 100644 punycode.zig diff --git a/generate.ts b/generate.ts index e353866f2dad87983281ac705149058e889995b6..f21c3c389a04dc342a6883f4d12e3c79b7734d7e 100644 --- a/generate.ts +++ b/generate.ts @@ -1,6 +1,28 @@ import { closeSync, openSync } from "node:fs"; const unicode_version = "17.0.0"; +const encoder = new TextEncoder(); + +function stringEscape(s?: string) { + if (!s) return ""; + return Array.from(encoder.encode(s.replace(/\\u([0-9A-F]{4})/g, (s) => String.fromCodePoint(parseInt(s.slice(2), 16))))) + .map((x) => { + if (x === 0x09) return "\\t"; + if (x === 0x0a) return "\\n"; + if (x === 0x0d) return "\\r"; + if (x === 0x20) return " "; + if (x === 0x21) return "!"; + if (x === 0x22) return `\\"`; + if (x >= 0x23 && x <= 0x26) return String.fromCodePoint(x); + if (x === 0x27) return "'"; + if (x >= 0x28 && x <= 0x5b) return String.fromCodePoint(x); + if (x === 0x5c) return "\\\\"; + if (x >= 0x5d && x <= 0x7e) return String.fromCodePoint(x); + return `\\x${x.toString(16).padStart(2, "0")}`; + }) + .join(""); +} +const E = stringEscape; { const source = `https://www.unicode.org/Public/${unicode_version}/idna/IdnaMappingTable.txt`; @@ -152,9 +174,72 @@ const unicode_version = "17.0.0"; w.write(`\n`); w.write(`// Based on the source file: ${source}\n`); w.write(`//\n`); + w.write(`// zig fmt: off\n`); w.write(`\n`); + w.write(`const std = @import("std");\n`); + w.write(`const idna = @import("unicode-idna");\n`); + w.write(`const expect = @import("expect").expect;\n`); - //TODO: + w.write(` +fn toUnicodePass( + source: []const u8, + expected: []const u8, +) !void { + const allocator = std.testing.allocator; + const result = try idna.ToUnicode(allocator, source, true, true, true, true, false, false); + defer allocator.free(result); + try expect(result).toEqualString(expected); +} + +fn toUnicodeFail( + source: []const u8, +) !void { + const allocator = std.testing.allocator; + const result = idna.ToUnicode(allocator, source, true, true, true, true, false, false) catch |err| switch (err) { + error.IDNAFailure => return, + error.OutOfMemory => return error.OutOfMemory, + }; + defer allocator.free(result); + return error.ShouldHaveFailed; +} + +fn toAsciiPass( + source: []const u8, + expected: []const u8, + Transitional_Processing: bool, +) !void { + const allocator = std.testing.allocator; + const result = try idna.ToASCII(allocator, source, true, true, true, true, Transitional_Processing, true, false); + defer allocator.free(result); + try expect(result).toEqualString(expected); +} + +fn toAsciiFail( + source: []const u8, + Transitional_Processing: bool, +) !void { + const allocator = std.testing.allocator; + const result = idna.ToASCII(allocator, source, true, true, true, true, Transitional_Processing, true, false) catch |err| switch (err) { + error.IDNAFailure => return, + error.OutOfMemory => return error.OutOfMemory, + }; + defer allocator.free(result); + return error.ShouldHaveFailed; +} +`); + w.write(`\n`); + + for (const i of cols) { + const source = i[0]; + const toUnicode = i[1] || source; + const toUnicodeStatus = i[2] || "[]"; + const toAsciiN = i[3] || toUnicode; + const toAsciiNStatus = i[4] || toUnicodeStatus; + const toAsciiT = i[5] || toAsciiN; + const toAsciiTStatus = i[6] || toAsciiNStatus; + + if (toUnicodeStatus === "[]") w.write(`test { try toUnicodePass("${E(source)}", "${E(toUnicode)}"); }\n`); + } w.flush(); } diff --git a/idna.zig b/idna.zig index d92ca9a26a4eb63b9077ce6e15c35348b3524162..09f81b25f931e1b9aed9ecb8e4810c09fe553307 100644 --- a/idna.zig +++ b/idna.zig @@ -1,5 +1,193 @@ const std = @import("std"); +const extras = @import("extras"); +const ucd = @import("unicode-ucd"); +const normalization = @import("./normalization.zig"); +const punycode = @import("./punycode.zig"); pub const @"2008" = @import("./2008.zig"); pub const table = @import("./table.zig"); + +pub fn ToASCII( + allocator: std.mem.Allocator, + domain_name: []const u8, + CheckHyphens: bool, + CheckBidi: bool, + CheckJoiners: bool, + UseSTD3ASCIIRules: bool, + Transitional_Processing: bool, //deprecated + VerifyDnsLength: bool, + IgnoreInvalidPunycode: bool, +) ![]u8 { + // if (extras.matchesAll(u8, domain_name, std.ascii.isAscii)) return allocator.dupe(u8, domain_name); + + var map = extras.ManyArrayList(u8).init(allocator); + defer map.deinit(); + + try Processing(&map, domain_name, UseSTD3ASCIIRules, CheckHyphens, CheckBidi, CheckJoiners, Transitional_Processing, IgnoreInvalidPunycode); + + map.lengths.clearRetainingCapacity(); + var it2 = std.mem.splitScalar(u8, map.list.items, '.'); + while (it2.next()) |label| { + try map.lengths.append(map.allocator, label.len); + try map.lengths.append(map.allocator, 1); + } + _ = map.lengths.orderedRemove(map.lengths.items.len - 1); + for (0..map.lengths.items.len) |n| { + punycode.encode(&map, n) catch |err| switch (err) { + error.InvalidPunycode => return error.IDNAFailure, + }; + } + + if (VerifyDnsLength) { + // + } + + return map.toOwnedSlice(); +} + +pub fn ToUnicode( + allocator: std.mem.Allocator, + domain_name: []const u8, + CheckHyphens: bool, + CheckBidi: bool, + CheckJoiners: bool, + UseSTD3ASCIIRules: bool, + Transitional_Processing: bool, //deprecated + IgnoreInvalidPunycode: bool, +) ![]u8 { + // if (extras.matchesAll(u8, domain_name, std.ascii.isAscii)) return allocator.dupe(u8, domain_name); + var map = extras.ManyArrayList(u8).init(allocator); + defer map.deinit(); + try Processing(&map, domain_name, UseSTD3ASCIIRules, CheckHyphens, CheckBidi, CheckJoiners, Transitional_Processing, IgnoreInvalidPunycode); + return map.toOwnedSlice(); +} + +fn Processing( + map: *extras.ManyArrayList(u8), + domain_name: []const u8, + UseSTD3ASCIIRules: bool, + CheckHyphens: bool, + CheckBidi: bool, + CheckJoiners: bool, + Transitional_Processing: bool, //deprecated + IgnoreInvalidPunycode: bool, +) !void { + try map.list.ensureUnusedCapacity(map.allocator, domain_name.len); + try map.lengths.ensureUnusedCapacity(map.allocator, domain_name.len); + // 1. Map. For each code point in the domain_name string, look up the Status value in Section 5, IDNA Mapping Table, and take the following actions: + var it = std.unicode.Utf8View.initUnchecked(domain_name).iterator(); + while (it.nextCodepointSlice()) |sl| { + const cp = std.unicode.utf8Decode(sl) catch unreachable; + const status, const mapping, const status2 = mappingRow(cp); + _ = status2; + sw: switch (status) { + .valid => { + try map.appendSlice(try map.add(), sl); + }, + .ignored => { + //nop + }, + .mapped => { + if (Transitional_Processing and cp == 'ẞ') { + try map.appendSlice(try map.add(), "s"); + try map.appendSlice(try map.add(), "s"); + continue; + } + for (mapping) |p| { + var buf: [4]u8 = undefined; + const l = std.unicode.utf8Encode(p, &buf) catch unreachable; + try map.appendSlice(try map.add(), buf[0..l]); + } + }, + .deviation => { + continue :sw if (Transitional_Processing) .mapped else .valid; + }, + .disallowed => { + continue :sw .valid; + }, + } + } + + // 2. Normalize. Normalize the domain_name string to Unicode Normalization Form C. + // https://unicode.org/reports/tr15/ + if (!isNFC(map)) try normalization.ToNFC(map); + + // 3. Break. Break the string into labels at U+002E ( . ) FULL STOP. + map.lengths.clearRetainingCapacity(); + var it2 = std.mem.splitScalar(u8, map.list.items, '.'); + while (it2.next()) |label| { + try map.lengths.append(map.allocator, label.len); + try map.lengths.append(map.allocator, 1); + } + _ = map.lengths.orderedRemove(map.lengths.items.len - 1); + + // 4. Convert/Validate. For each label in the domain_name string: + for (0..map.lengths.items.len) |n| { + var label = map.items(n); + if (std.mem.eql(u8, label, ".")) continue; + if (std.mem.startsWith(u8, label, "xn--")) { + // 1. If the label contains any non-ASCII code point (i.e., a code point greater than U+007F), record that there was an error, and continue with the next label. + if (!extras.matchesAll(u8, label, std.ascii.isAscii)) return error.IDNAFailure; + // 2. Attempt to convert the rest of the label to Unicode according to Punycode [RFC3492]. If that conversion fails and if not IgnoreInvalidPunycode, record that there was an error, and continue with the next label. Otherwise replace the original label in the string by the results of the conversion. + punycode.decode(map, n) catch |err| switch (err) { + error.InvalidPunycode => if (!IgnoreInvalidPunycode) return error.IDNAFailure, + else => |e| return e, + }; + label = map.items(n); + // 3. If the label is empty, or if the label contains only ASCII code points, record that there was an error. + if (label.len == 0) return error.IDNAFailure; + if (extras.matchesAll(u8, label, std.ascii.isAscii)) return error.IDNAFailure; + // 4. Verify that the label meets the validity criteria in Section 4.1, Validity Criteria for Nontransitional Processing. If any of the validity criteria are not satisfied, record that there was an error. + try Validity_Criteria(label, CheckHyphens, true, false, UseSTD3ASCIIRules, CheckJoiners, CheckBidi); + } else { + // 1. Verify that the label meets the validity criteria in Section 4.1, Validity Criteria for the input Processing choice (Transitional or Nontransitional). If any of the validity criteria are not satisfied, record that there was an error. + try Validity_Criteria(label, CheckHyphens, Transitional_Processing, !Transitional_Processing, UseSTD3ASCIIRules, CheckJoiners, CheckBidi); + } + } +} + +// +// +// + +fn mappingRow(cp: u21) struct { table.Status, []const u21, table.Status2008 } { + if (std.sort.binarySearch(table.Row, &table.data, cp, extras.compareFnField(u21, table.Row, .cp))) |idx| { + const row = table.data[idx]; + return .{ row.status, row.mapping, row.status2 }; + } + if (std.sort.binarySearch(table.RowRange, &table.data_range, cp, extras.compareFnRange(u21, table.RowRange, .from, .to))) |idx| { + const row = table.data_range[idx]; + return .{ row.status, row.mapping, row.status2 }; + } + unreachable; +} + +// TODO: +fn isNFC(map: *const extras.ManyArrayList(u8)) bool { + _ = map; + return false; +} + +fn Validity_Criteria( + label: []const u8, + CheckHyphens: bool, + Transitional_Processing: bool, //deprecated, + NonTransitional_Processing: bool, //deprecated, + UseSTD3ASCIIRules: bool, + CheckJoiners: bool, + CheckBidi: bool, +) !void { + // if (!isNFC(label)) return error.IDNAFailure; // TODO: + if (CheckHyphens and label.len >= 4 and label[2] == '-' and label[3] == '-') return error.IDNAFailure; + if (CheckHyphens and std.mem.startsWith(u8, label, "-")) return error.IDNAFailure; + if (CheckHyphens and std.mem.endsWith(u8, label, "-")) return error.IDNAFailure; + if (!CheckHyphens and std.mem.startsWith(u8, label, "xn--")) return error.IDNAFailure; + if (std.mem.indexOfScalar(u8, label, '.') != null) return error.IDNAFailure; + + _ = Transitional_Processing; + _ = NonTransitional_Processing; + _ = UseSTD3ASCIIRules; + _ = CheckJoiners; + _ = CheckBidi; +} diff --git a/licenses.txt b/licenses.txt index 6336b470e0dc9933d1fad883c84eaf86174573d6..f233f0fa0acc33e2ac98bd5a395c7860d63bf1a5 100644 --- a/licenses.txt +++ b/licenses.txt @@ -1,3 +1,6 @@ MIT: = https://spdx.org/licenses/MIT - This +- git https://github.com/nektro/zig-expect +- git https://github.com/nektro/zig-extras +- git https://github.com/nektro/zig-unicode-ucd diff --git a/normalization.zig b/normalization.zig new file mode 100644 index 0000000000000000000000000000000000000000..797fd80a1fdbb3f731346c5462f4ee9fb020312b --- /dev/null +++ b/normalization.zig @@ -0,0 +1,238 @@ +const std = @import("std"); +const extras = @import("extras"); +const ucd = @import("unicode-ucd"); + +const data = extras.StaticMultiList(ucd.unicode_data.Codepoint).initComptime(&ucd.unicode_data.data); +const data_first_gap = blk: { + for (data.items[0], 0..) |cp, i| { + if (cp != i) { + break :blk i; + } + } +}; +// comptime { @compileLog(data_first_gap); } // 888 as of 17. + +// hangul syllable constants +const SBase = 0xAC00; +const LBase = 0x1100; +const VBase = 0x1161; +const TBase = 0x11A7; +const LCount = 19; +const VCount = 21; +const TCount = 28; +const NCount = VCount * TCount; +const SCount = LCount * NCount; + +pub fn ToNFD(map: *extras.ManyArrayList(u8)) !void { + try Decomposition(map, .canonical); +} + +pub fn ToNFC(map: *extras.ManyArrayList(u8)) !void { + try ToNFD(map); + try CanonicalComposition(map); +} + +pub fn ToNFKD(map: *extras.ManyArrayList(u8)) !void { + try Decomposition(map, .compatibility); +} + +pub fn ToNFKC(map: *extras.ManyArrayList(u8)) !void { + try ToNFKD(map); + try CanonicalComposition(map); +} + +fn Decomposition(map: *extras.ManyArrayList(u8), kind: enum { canonical, compatibility }) !void { + // fully decompose all codepoints in the string + var n: usize = 0; + while (n < map.lengths.items.len) : (n += 1) { + const sl = map.items(n); + const cp = std.unicode.utf8Decode(sl) catch unreachable; + if (std.sort.binarySearch(u21, data.items[0], cp, extras.compareFnBasic(u21))) |j| { + if (data.items[5][j] == .__none) continue; + if ((data.items[5][j] == .__canonical) != (kind == .canonical)) continue; + map.remove(n); + for (data.items[6][j], 0..) |ktem, k| { + var buf: [4]u8 = undefined; + const l = std.unicode.utf8Encode(ktem, &buf) catch unreachable; + try map.insertAt(n + k, buf[0..l]); + } + n += data.items[6][j].len - 1; + } + } + // sort non-starters with respect to canonical ordering + n = 0; + while (n < map.lengths.items.len) : (n += 1) { + const sln = map.items(n); + const cp = std.unicode.utf8Decode(sln) catch unreachable; + const ccc = cpCCC(cp); + if (ccc == 0) continue; // starter copdepoint + if (n == map.lengths.items.len - 1) break; + var buf: [128]u8 = @splat(0); + var len: u8 = 0; + buf[0] = ccc; + len += 1; + for (n + 1..map.lengths.items.len) |j| { + const slj = map.items(j); + const dp = std.unicode.utf8Decode(slj) catch unreachable; + const ddd = cpCCC(dp); + if (ddd == 0) break; + buf[len] = ddd; + len += 1; + } + const S = struct { + nstart: usize, + buf: []u8, + map: *extras.ManyArrayList(u8), + + pub fn lessThan(self: *const @This(), a: usize, b: usize) bool { + return self.buf[a] < self.buf[b]; + } + pub fn swap(self: *const @This(), a: usize, b: usize) void { + std.mem.swap(u8, &self.buf[a], &self.buf[b]); + self.map.swap(self.nstart + a, self.nstart + b); + } + }; + std.mem.sortContext(0, len, S{ + .nstart = n, + .buf = buf[0..len], + .map = map, + }); + n += len; + } +} + +fn CanonicalComposition(map: *extras.ManyArrayList(u8)) !void { + if (map.lengths.items.len < 2) { + return; + } + + if (map.lengths.items.len == 2) { + const sll = map.items(0); + const l = std.unicode.utf8Decode(sll) catch unreachable; + const slc = map.items(1); + const c = std.unicode.utf8Decode(slc) catch unreachable; + + for (&ucd.unicode_data.data) |d| { + if (d[5] != .__canonical) continue; + if (d[6].len != 2) continue; + if (d[6][0] != l) continue; + if (d[6][1] != c) continue; + if (std.sort.binarySearch(u21, &ucd.composition_exclusions.data, d[0], extras.compareFnBasic(u21)) != null) continue; + if (d[3] != 0) continue; + + var buf: [4]u8 = undefined; + const len = std.unicode.utf8Encode(d[0], &buf) catch unreachable; + try map.set(0, buf[0..len]); + map.remove(1); + break; + } + return; + } + + var i: usize = 1; + while (i < map.lengths.items.len) : (i += 1) { + const slc = map.items(i); + const c = std.unicode.utf8Decode(slc) catch unreachable; + var j: usize = i - 1; + var sll = map.items(j); + var l = std.unicode.utf8Decode(sll) catch unreachable; + while (j > 0) : (j -= 1) { + sll = map.items(j); + l = std.unicode.utf8Decode(sll) catch unreachable; + if (cpCCC(l) == 0) break; + } + for (&ucd.unicode_data.data) |d| { + if (d[5] != .__canonical) continue; + if (d[6].len != 2) continue; + if (d[6][0] != l) continue; + if (d[6][1] != c) continue; + if (std.sort.binarySearch(u21, &ucd.composition_exclusions.data, d[0], extras.compareFnBasic(u21)) != null) continue; + if (d[3] != 0) continue; + + var buf: [4]u8 = undefined; + const len = std.unicode.utf8Encode(d[0], &buf) catch unreachable; + try map.set(j, buf[0..len]); + map.remove(i); + i -= 1; + break; + } + } + i = 0; + while (i < map.lengths.items.len) : (i += 1) { + const sll = map.items(i); + const cpl = std.unicode.utf8Decode(sll) catch unreachable; + if ((hangul_syllable_type(cpl) orelse continue) != .L) continue; + std.debug.assert(cpl >= 0x1100 and cpl <= 0x1112); + + if (i + 1 == map.lengths.items.len) break; + const slv = map.items(i + 1); + const cpv = std.unicode.utf8Decode(slv) catch unreachable; + if ((hangul_syllable_type(cpv) orelse continue) != .V) continue; + std.debug.assert(cpv >= 0x1161 and cpv <= 0x1175); + + if (i + 2 == map.lengths.items.len) { + //seq is only + try composeHangulSyllable2(map, i, cpl, cpv); + continue; + } + + const slt = map.items(i + 2); + const cpt = std.unicode.utf8Decode(slt) catch unreachable; + if ((hangul_syllable_type(cpt) orelse { + // try composeHangulSyllable2(map, i, cpl, cpv); + continue; + }) != .T) { + // try composeHangulSyllable2(map, i, cpl, cpv); + continue; + } + std.debug.assert(cpt >= 0x11A8 and cpt <= 0x11C2); + // seq is + try composeHangulSyllable3(map, i, cpl, cpv, cpt); + } +} + +fn cpCCC(cp: u21) u8 { + if (cp < data_first_gap) { + return data.items[3][cp]; + } + if (std.sort.binarySearch(u21, data.items[0], cp, extras.compareFnBasic(u21))) |idx| { + return data.items[3][idx]; + } + // TODO: this happens to be correct but ucd.unicode_data needs to detect the block ranges + return 0; +} + +fn hangul_syllable_type(cp: u21) ?ucd.HangulSyllableType { + // can't use std.sort.binarySearch on this set because it's not sorted + // TODO: update ucd to have that property + for (&ucd.hangul_syllable_type.data) |d| { + if (cp >= d.from and cp <= d.to) { + return d.prop; + } + } + return null; +} + +fn composeHangulSyllable2(map: *extras.ManyArrayList(u8), i: usize, cpl: u21, cpv: u21) !void { + const LIndex = cpl - LBase; + const VIndex = cpv - VBase; + const LVIndex = LIndex * NCount + VIndex * TCount; + const cps = SBase + LVIndex; + var buf: [4]u8 = undefined; + const len = std.unicode.utf8Encode(cps, &buf) catch unreachable; + try map.set(i, buf[0..len]); + map.remove(i + 1); +} + +fn composeHangulSyllable3(map: *extras.ManyArrayList(u8), i: usize, cpl: u21, cpv: u21, cpt: u21) !void { + const LIndex = cpl - LBase; + const VIndex = cpv - VBase; + const TIndex = cpt - TBase; + const LVIndex = LIndex * NCount + VIndex * TCount; + const cps = SBase + LVIndex + TIndex; + var buf: [4]u8 = undefined; + const len = std.unicode.utf8Encode(cps, &buf) catch unreachable; + try map.set(i, buf[0..len]); + map.remove(i + 1); + map.remove(i + 1); +} diff --git a/punycode.zig b/punycode.zig new file mode 100644 index 0000000000000000000000000000000000000000..39ba29ea07c29a795d83343c4f9a881f703bcef1 --- /dev/null +++ b/punycode.zig @@ -0,0 +1,137 @@ +const std = @import("std"); +const extras = @import("extras"); + +const base = 36; +const tmin = 1; +const tmax = 26; +const skew = 38; +const damp = 700; +const initial_bias = 72; +const initial_n = 128; +const delimiter = '-'; + +pub fn decode(map: *extras.ManyArrayList(u8), map_n: usize) !void { + var input = map.items(map_n); + var offset: usize = 0; + const initial_len = input.len; + // std.debug.assert(std.mem.startsWith(u8, map.items(n), "xn--")); + offset += 4; + input = input[offset..initial_len]; + + var word_n: u32 = 0; + word_n += initial_n; + + // let n = initial_n + var n: u21 = 128; + // let i = 0 + var i: u32 = 0; + // let bias = initial_bias + var bias: u32 = initial_bias; + // let output = an empty string indexed from 0 + // output is ascii so output_length as codepoint or bytes is the same + var output_length: u32 = 0; + // consume all code points before the last delimiter (if there is one) and copy them to output, fail on any non-basic code point + // if more than zero code points were consumed then consume one more (which will be the last delimiter) + if (std.mem.lastIndexOfScalar(u8, input, delimiter)) |idx| { + // we're passing input as what we're appending so we have to ensure the backing allocation is not invalidated by calling append + try map.list.ensureUnusedCapacity(map.allocator, idx); + input = map.items(map_n)[offset..initial_len]; + try map.appendSlice(map_n, input[0..idx]); + offset += idx + 1; + input = input[idx + 1 ..]; + output_length += @intCast(idx); + } + // while the input is not exhausted do begin + while (offset < initial_len) { + // let oldi = i + const oldi = i; + // let w = 1 + var w: u32 = 1; + // for k = base to infinity in steps of base do begin + var k: u32 = base; + while (true) : (k += base) { + // consume a code point, or fail if there was none to consume + if (input.len == 0) return error.InvalidPunycode; + const sl = input[0 .. std.unicode.utf8ByteSequenceLength(input[0]) catch unreachable]; + offset += sl.len; + input = input[sl.len..]; + // let digit = the code point's digit-value, fail if it has none + const cp = std.unicode.utf8Decode(sl) catch unreachable; + const digit: u32 = blk: { + if (cp >= 'A' and cp <= 'Z') break :blk cp - 'A'; + if (cp >= 'a' and cp <= 'z') break :blk cp - 'a'; + if (cp >= '0' and cp <= '9') break :blk cp - '0' + 26; + return error.InvalidPunycode; + }; + // let i = i + digit * w, fail on overflow + i = std.math.add(u32, i, std.math.mul(u32, digit, w) catch return error.InvalidPunycode) catch return error.InvalidPunycode; + // let t = tmin if k <= bias {+ tmin}, or + // tmax if k >= bias + tmax, or k - bias otherwise + const t = if (k <= bias) tmin else if (k >= bias + tmax) tmax else k - bias; + // if digit < t then break + if (digit < t) break; + // let w = w * (base - t), fail on overflow + w = w * (base - t); + } + // let bias = adapt(i - oldi, length(output) + 1, test oldi is 0?) + bias = adapt(i - oldi, output_length + 1, oldi == 0); + // let n = n + i div (length(output) + 1), fail on overflow + n = std.math.add(u21, n, @intCast(i / (output_length + 1))) catch return error.InvalidPunycode; + // let i = i mod (length(output) + 1) + i = i % (output_length + 1); + // {if n is a basic code point then fail} + std.debug.assert(n > std.math.maxInt(u7)); + // insert n into output at position i + if (i == output_length) { + var buf: [4]u8 = undefined; + const len = std.unicode.utf8Encode(n, &buf) catch unreachable; + try map.appendSlice(map_n, buf[0..len]); + input = map.items(map_n)[offset..initial_len]; + output_length += 1; + } else { + var ioff: usize = 0; + var cpi: usize = 0; + var it = std.unicode.Utf8View.initUnchecked(map.items(map_n)[initial_len..]).iterator(); + while (it.nextCodepointSlice()) |sl| { + if (cpi == i) break; + ioff += sl.len; + cpi += 1; + } + var buf: [4]u8 = undefined; + const len = std.unicode.utf8Encode(n, &buf) catch unreachable; + try map.replace(map_n, initial_len + ioff, 0, buf[0..len]); + input = map.items(map_n)[offset..initial_len]; + output_length += 1; + } + // increment i + i += 1; + } + + try map.replace(map_n, 0, initial_len, ""); +} + +fn adapt(delta_: u32, numpoints: u32, firsttime: bool) u32 { + var delta = delta_; + // if firsttime then let delta = delta div damp + // else let delta = delta div 2 + delta = if (firsttime) delta / damp else delta / 2; + // let delta = delta + (delta div numpoints) + delta = delta + (delta / numpoints); + // let k = 0 + var k: u32 = 0; + // while delta > ((base - tmin) * tmax) div 2 do begin + while (delta > ((base - tmin) * tmax) / 2) { + // let delta = delta div (base - tmin) + delta /= base - tmin; + // let k = k + base + k += base; + } + // return k + (((base - tmin + 1) * delta) div (delta + skew)) + return k + (((base - tmin + 1) * delta) / (delta + skew)); +} + +// TODO: +pub fn encode(map: *extras.ManyArrayList(u8), n: usize) !void { + _ = map; + _ = n; +} diff --git a/testv2.zig b/testv2.zig index 903b4741f446cf526314609c4f3fe64b760fe66c..9f75c305a302f22de2fdf9574e2488de28aba536 100755 --- a/testv2.zig +++ b/testv2.zig @@ -4,4 +4,716 @@ // Based on the source file: https://www.unicode.org/Public/17.0.0/idna/IdnaTestV2.txt // +// zig fmt: off +const std = @import("std"); +const idna = @import("unicode-idna"); +const expect = @import("expect").expect; + +fn toUnicodePass( + source: []const u8, + expected: []const u8, +) !void { + const allocator = std.testing.allocator; + const result = try idna.ToUnicode(allocator, source, true, true, true, true, false, false); + defer allocator.free(result); + try expect(result).toEqualString(expected); +} + +fn toUnicodeFail( + source: []const u8, +) !void { + const allocator = std.testing.allocator; + const result = idna.ToUnicode(allocator, source, true, true, true, true, false, false) catch |err| switch (err) { + error.IDNAFailure => return, + error.OutOfMemory => return error.OutOfMemory, + }; + defer allocator.free(result); + return error.ShouldHaveFailed; +} + +fn toAsciiPass( + source: []const u8, + expected: []const u8, + Transitional_Processing: bool, +) !void { + const allocator = std.testing.allocator; + const result = try idna.ToASCII(allocator, source, true, true, true, true, Transitional_Processing, true, false); + defer allocator.free(result); + try expect(result).toEqualString(expected); +} + +fn toAsciiFail( + source: []const u8, + Transitional_Processing: bool, +) !void { + const allocator = std.testing.allocator; + const result = idna.ToASCII(allocator, source, true, true, true, true, Transitional_Processing, true, false) catch |err| switch (err) { + error.IDNAFailure => return, + error.OutOfMemory => return error.OutOfMemory, + }; + defer allocator.free(result); + return error.ShouldHaveFailed; +} + +test { try toUnicodePass("fass.de", "fass.de"); } +test { try toUnicodePass("fa\xc3\x9f.de", "fa\xc3\x9f.de"); } +test { try toUnicodePass("Fa\xc3\x9f.de", "fa\xc3\x9f.de"); } +test { try toUnicodePass("xn--fa-hia.de", "fa\xc3\x9f.de"); } +test { try toUnicodePass("\xc3\xa0.\xd7\x90\xcc\x88", "\xc3\xa0.\xd7\x90\xcc\x88"); } +test { try toUnicodePass("a\xcc\x80.\xd7\x90\xcc\x88", "\xc3\xa0.\xd7\x90\xcc\x88"); } +test { try toUnicodePass("A\xcc\x80.\xd7\x90\xcc\x88", "\xc3\xa0.\xd7\x90\xcc\x88"); } +test { try toUnicodePass("\xc3\x80.\xd7\x90\xcc\x88", "\xc3\xa0.\xd7\x90\xcc\x88"); } +test { try toUnicodePass("xn--0ca.xn--ssa73l", "\xc3\xa0.\xd7\x90\xcc\x88"); } +test { try toUnicodePass("\xc3\xa0\xcc\x88.\xd7\x90", "\xc3\xa0\xcc\x88.\xd7\x90"); } +test { try toUnicodePass("a\xcc\x80\xcc\x88.\xd7\x90", "\xc3\xa0\xcc\x88.\xd7\x90"); } +test { try toUnicodePass("A\xcc\x80\xcc\x88.\xd7\x90", "\xc3\xa0\xcc\x88.\xd7\x90"); } +test { try toUnicodePass("\xc3\x80\xcc\x88.\xd7\x90", "\xc3\xa0\xcc\x88.\xd7\x90"); } +test { try toUnicodePass("xn--0ca81i.xn--4db", "\xc3\xa0\xcc\x88.\xd7\x90"); } +test { try toUnicodePass("ab", "ab"); } +test { try toUnicodePass("a\xe0\xa5\x8d\xe2\x80\x8cb", "a\xe0\xa5\x8d\xe2\x80\x8cb"); } +test { try toUnicodePass("A\xe0\xa5\x8d\xe2\x80\x8cB", "a\xe0\xa5\x8d\xe2\x80\x8cb"); } +test { try toUnicodePass("A\xe0\xa5\x8d\xe2\x80\x8cb", "a\xe0\xa5\x8d\xe2\x80\x8cb"); } +test { try toUnicodePass("xn--ab-fsf", "a\xe0\xa5\x8db"); } +test { try toUnicodePass("a\xe0\xa5\x8db", "a\xe0\xa5\x8db"); } +test { try toUnicodePass("A\xe0\xa5\x8dB", "a\xe0\xa5\x8db"); } +test { try toUnicodePass("A\xe0\xa5\x8db", "a\xe0\xa5\x8db"); } +test { try toUnicodePass("xn--ab-fsf604u", "a\xe0\xa5\x8d\xe2\x80\x8cb"); } +test { try toUnicodePass("a\xe0\xa5\x8d\xe2\x80\x8db", "a\xe0\xa5\x8d\xe2\x80\x8db"); } +test { try toUnicodePass("A\xe0\xa5\x8d\xe2\x80\x8dB", "a\xe0\xa5\x8d\xe2\x80\x8db"); } +test { try toUnicodePass("A\xe0\xa5\x8d\xe2\x80\x8db", "a\xe0\xa5\x8d\xe2\x80\x8db"); } +test { try toUnicodePass("xn--ab-fsf014u", "a\xe0\xa5\x8d\xe2\x80\x8db"); } +test { try toUnicodePass("\xc2\xa1", "\xc2\xa1"); } +test { try toUnicodePass("xn--7a", "\xc2\xa1"); } +test { try toUnicodePass("\xe1\xa7\x9a", "\xe1\xa7\x9a"); } +test { try toUnicodePass("xn--pkf", "\xe1\xa7\x9a"); } +test { try toUnicodePass("\xea\xad\xa0", "\xea\xad\xa0"); } +test { try toUnicodePass("xn--3y9a", "\xea\xad\xa0"); } +test { try toUnicodePass("1234567890\xc3\xa41234567890123456789012345678901234567890123456", "1234567890\xc3\xa41234567890123456789012345678901234567890123456"); } +test { try toUnicodePass("1234567890a\xcc\x881234567890123456789012345678901234567890123456", "1234567890\xc3\xa41234567890123456789012345678901234567890123456"); } +test { try toUnicodePass("1234567890A\xcc\x881234567890123456789012345678901234567890123456", "1234567890\xc3\xa41234567890123456789012345678901234567890123456"); } +test { try toUnicodePass("1234567890\xc3\x841234567890123456789012345678901234567890123456", "1234567890\xc3\xa41234567890123456789012345678901234567890123456"); } +test { try toUnicodePass("xn--12345678901234567890123456789012345678901234567890123456-fxe", "1234567890\xc3\xa41234567890123456789012345678901234567890123456"); } +test { try toUnicodePass("www.eXample.cOm", "www.example.com"); } +test { try toUnicodePass("B\xc3\xbccher.de", "b\xc3\xbccher.de"); } +test { try toUnicodePass("Bu\xcc\x88cher.de", "b\xc3\xbccher.de"); } +test { try toUnicodePass("bu\xcc\x88cher.de", "b\xc3\xbccher.de"); } +test { try toUnicodePass("b\xc3\xbccher.de", "b\xc3\xbccher.de"); } +test { try toUnicodePass("B\xc3\x9cCHER.DE", "b\xc3\xbccher.de"); } +test { try toUnicodePass("BU\xcc\x88CHER.DE", "b\xc3\xbccher.de"); } +test { try toUnicodePass("xn--bcher-kva.de", "b\xc3\xbccher.de"); } +test { try toUnicodePass("\xc3\x96BB", "\xc3\xb6bb"); } +test { try toUnicodePass("O\xcc\x88BB", "\xc3\xb6bb"); } +test { try toUnicodePass("o\xcc\x88bb", "\xc3\xb6bb"); } +test { try toUnicodePass("\xc3\xb6bb", "\xc3\xb6bb"); } +test { try toUnicodePass("\xc3\x96bb", "\xc3\xb6bb"); } +test { try toUnicodePass("O\xcc\x88bb", "\xc3\xb6bb"); } +test { try toUnicodePass("xn--bb-eka", "\xc3\xb6bb"); } +test { try toUnicodePass("FA\xe1\xba\x9e.de", "fa\xc3\x9f.de"); } +test { try toUnicodePass("FA\xe1\xba\x9e.DE", "fa\xc3\x9f.de"); } +test { try toUnicodePass("\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82.com"); } +test { try toUnicodePass("\xce\xb2\xce\xbf\xcc\x81\xce\xbb\xce\xbf\xcf\x82.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82.com"); } +test { try toUnicodePass("\xce\x92\xce\x9f\xcc\x81\xce\x9b\xce\x9f\xce\xa3.COM", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com"); } +test { try toUnicodePass("\xce\x92\xce\x8c\xce\x9b\xce\x9f\xce\xa3.COM", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com"); } +test { try toUnicodePass("\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com"); } +test { try toUnicodePass("\xce\xb2\xce\xbf\xcc\x81\xce\xbb\xce\xbf\xcf\x83.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com"); } +test { try toUnicodePass("\xce\x92\xce\xbf\xcc\x81\xce\xbb\xce\xbf\xcf\x83.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com"); } +test { try toUnicodePass("\xce\x92\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com"); } +test { try toUnicodePass("xn--nxasmq6b.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83.com"); } +test { try toUnicodePass("\xce\x92\xce\xbf\xcc\x81\xce\xbb\xce\xbf\xcf\x82.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82.com"); } +test { try toUnicodePass("\xce\x92\xcf\x8c\xce\xbb\xce\xbf\xcf\x82.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82.com"); } +test { try toUnicodePass("xn--nxasmm1c.com", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82.com"); } +test { try toUnicodePass("xn--nxasmm1c", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82"); } +test { try toUnicodePass("\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82"); } +test { try toUnicodePass("\xce\xb2\xce\xbf\xcc\x81\xce\xbb\xce\xbf\xcf\x82", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82"); } +test { try toUnicodePass("\xce\x92\xce\x9f\xcc\x81\xce\x9b\xce\x9f\xce\xa3", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83"); } +test { try toUnicodePass("\xce\x92\xce\x8c\xce\x9b\xce\x9f\xce\xa3", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83"); } +test { try toUnicodePass("\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83"); } +test { try toUnicodePass("\xce\xb2\xce\xbf\xcc\x81\xce\xbb\xce\xbf\xcf\x83", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83"); } +test { try toUnicodePass("\xce\x92\xce\xbf\xcc\x81\xce\xbb\xce\xbf\xcf\x83", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83"); } +test { try toUnicodePass("\xce\x92\xcf\x8c\xce\xbb\xce\xbf\xcf\x83", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83"); } +test { try toUnicodePass("xn--nxasmq6b", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x83"); } +test { try toUnicodePass("\xce\x92\xcf\x8c\xce\xbb\xce\xbf\xcf\x82", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82"); } +test { try toUnicodePass("\xce\x92\xce\xbf\xcc\x81\xce\xbb\xce\xbf\xcf\x82", "\xce\xb2\xcf\x8c\xce\xbb\xce\xbf\xcf\x82"); } +test { try toUnicodePass("www.\xe0\xb7\x81\xe0\xb7\x8a\xe2\x80\x8d\xe0\xb6\xbb\xe0\xb7\x93.com", "www.\xe0\xb7\x81\xe0\xb7\x8a\xe2\x80\x8d\xe0\xb6\xbb\xe0\xb7\x93.com"); } +test { try toUnicodePass("WWW.\xe0\xb7\x81\xe0\xb7\x8a\xe2\x80\x8d\xe0\xb6\xbb\xe0\xb7\x93.COM", "www.\xe0\xb7\x81\xe0\xb7\x8a\xe2\x80\x8d\xe0\xb6\xbb\xe0\xb7\x93.com"); } +test { try toUnicodePass("Www.\xe0\xb7\x81\xe0\xb7\x8a\xe2\x80\x8d\xe0\xb6\xbb\xe0\xb7\x93.com", "www.\xe0\xb7\x81\xe0\xb7\x8a\xe2\x80\x8d\xe0\xb6\xbb\xe0\xb7\x93.com"); } +test { try toUnicodePass("www.xn--10cl1a0b.com", "www.\xe0\xb7\x81\xe0\xb7\x8a\xe0\xb6\xbb\xe0\xb7\x93.com"); } +test { try toUnicodePass("www.\xe0\xb7\x81\xe0\xb7\x8a\xe0\xb6\xbb\xe0\xb7\x93.com", "www.\xe0\xb7\x81\xe0\xb7\x8a\xe0\xb6\xbb\xe0\xb7\x93.com"); } +test { try toUnicodePass("WWW.\xe0\xb7\x81\xe0\xb7\x8a\xe0\xb6\xbb\xe0\xb7\x93.COM", "www.\xe0\xb7\x81\xe0\xb7\x8a\xe0\xb6\xbb\xe0\xb7\x93.com"); } +test { try toUnicodePass("Www.\xe0\xb7\x81\xe0\xb7\x8a\xe0\xb6\xbb\xe0\xb7\x93.com", "www.\xe0\xb7\x81\xe0\xb7\x8a\xe0\xb6\xbb\xe0\xb7\x93.com"); } +test { try toUnicodePass("www.xn--10cl1a0b660p.com", "www.\xe0\xb7\x81\xe0\xb7\x8a\xe2\x80\x8d\xe0\xb6\xbb\xe0\xb7\x93.com"); } +test { try toUnicodePass("\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xe2\x80\x8c\xd8\xa7\xdb\x8c", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xe2\x80\x8c\xd8\xa7\xdb\x8c"); } +test { try toUnicodePass("xn--mgba3gch31f", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xd8\xa7\xdb\x8c"); } +test { try toUnicodePass("\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xd8\xa7\xdb\x8c", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xd8\xa7\xdb\x8c"); } +test { try toUnicodePass("xn--mgba3gch31f060k", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xe2\x80\x8c\xd8\xa7\xdb\x8c"); } +test { try toUnicodePass("xn--mgba3gch31f060k.com", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xe2\x80\x8c\xd8\xa7\xdb\x8c.com"); } +test { try toUnicodePass("\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xe2\x80\x8c\xd8\xa7\xdb\x8c.com", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xe2\x80\x8c\xd8\xa7\xdb\x8c.com"); } +test { try toUnicodePass("\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xe2\x80\x8c\xd8\xa7\xdb\x8c.COM", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xe2\x80\x8c\xd8\xa7\xdb\x8c.com"); } +test { try toUnicodePass("xn--mgba3gch31f.com", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xd8\xa7\xdb\x8c.com"); } +test { try toUnicodePass("\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xd8\xa7\xdb\x8c.com", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xd8\xa7\xdb\x8c.com"); } +test { try toUnicodePass("\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xd8\xa7\xdb\x8c.COM", "\xd9\x86\xd8\xa7\xd9\x85\xd9\x87\xd8\xa7\xdb\x8c.com"); } +test { try toUnicodePass("a.b\xef\xbc\x8ec\xe3\x80\x82d\xef\xbd\xa1", "a.b.c.d."); } +test { try toUnicodePass("a.b.c\xe3\x80\x82d\xe3\x80\x82", "a.b.c.d."); } +test { try toUnicodePass("A.B.C\xe3\x80\x82D\xe3\x80\x82", "a.b.c.d."); } +test { try toUnicodePass("A.b.c\xe3\x80\x82D\xe3\x80\x82", "a.b.c.d."); } +test { try toUnicodePass("a.b.c.d.", "a.b.c.d."); } +test { try toUnicodePass("A.B\xef\xbc\x8eC\xe3\x80\x82D\xef\xbd\xa1", "a.b.c.d."); } +test { try toUnicodePass("A.b\xef\xbc\x8ec\xe3\x80\x82D\xef\xbd\xa1", "a.b.c.d."); } +test { try toUnicodePass("U\xcc\x88.xn--tda", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("\xc3\x9c.xn--tda", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("\xc3\xbc.xn--tda", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("u\xcc\x88.xn--tda", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("U\xcc\x88.XN--TDA", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("\xc3\x9c.XN--TDA", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("\xc3\x9c.xn--Tda", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("U\xcc\x88.xn--Tda", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("xn--tda.xn--tda", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("\xc3\xbc.\xc3\xbc", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("u\xcc\x88.u\xcc\x88", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("U\xcc\x88.U\xcc\x88", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("\xc3\x9c.\xc3\x9c", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("\xc3\x9c.\xc3\xbc", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("U\xcc\x88.u\xcc\x88", "\xc3\xbc.\xc3\xbc"); } +test { try toUnicodePass("a1.com", "a1.com"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e\xe3\x80\x82\xef\xbc\xaa\xef\xbc\xb0", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e\xe3\x80\x82JP", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e\xe3\x80\x82jp", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e\xe3\x80\x82Jp", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("xn--wgv71a119e.jp", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.JP", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.Jp", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e\xe3\x80\x82\xef\xbd\x8a\xef\xbd\x90", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e\xe3\x80\x82\xef\xbc\xaa\xef\xbd\x90", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e.jp"); } +test { try toUnicodePass("\xe2\x98\x95", "\xe2\x98\x95"); } +test { try toUnicodePass("xn--53h", "\xe2\x98\x95"); } +test { try toUnicodePass("1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa", "1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz"); } +test { try toUnicodePass("1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz", "1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz"); } +test { try toUnicodePass("1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\xcc\x82ssz", "1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz"); } +test { try toUnicodePass("1.ASSBCSSSSSSSSD\xce\xa3\xce\xa3SSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSS\xcc\x82SSZ", "1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz"); } +test { try toUnicodePass("1.ASSBCSSSSSSSSD\xce\xa3\xce\xa3SSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSS\xc5\x9cSSZ", "1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz"); } +test { try toUnicodePass("1.Assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz", "1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz"); } +test { try toUnicodePass("1.Assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\xcc\x82ssz", "1.assbcssssssssd\xcf\x83\xcf\x83ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\xc5\x9dssz"); } +test { try toUnicodePass("xn--bss", "\xe5\xa4\x99"); } +test { try toUnicodePass("\xe5\xa4\x99", "\xe5\xa4\x99"); } +test { try toUnicodePass("\xcb\xa3\xcd\x8f\xe2\x84\x95\xe2\x80\x8b\xef\xb9\xa3\xc2\xad\xef\xbc\x8d\xe1\xa0\x8c\xe2\x84\xac\xef\xb8\x80\xc5\xbf\xe2\x81\xa4\xf0\x9d\x94\xb0\xf3\xa0\x87\xaf\xef\xac\x84", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("x\xcd\x8fN\xe2\x80\x8b-\xc2\xad-\xe1\xa0\x8cB\xef\xb8\x80s\xe2\x81\xa4s\xf3\xa0\x87\xafffl", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("x\xcd\x8fn\xe2\x80\x8b-\xc2\xad-\xe1\xa0\x8cb\xef\xb8\x80s\xe2\x81\xa4s\xf3\xa0\x87\xafffl", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("X\xcd\x8fN\xe2\x80\x8b-\xc2\xad-\xe1\xa0\x8cB\xef\xb8\x80S\xe2\x81\xa4S\xf3\xa0\x87\xafFFL", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("X\xcd\x8fn\xe2\x80\x8b-\xc2\xad-\xe1\xa0\x8cB\xef\xb8\x80s\xe2\x81\xa4s\xf3\xa0\x87\xafffl", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("xn--bssffl", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("\xcb\xa3\xcd\x8f\xe2\x84\x95\xe2\x80\x8b\xef\xb9\xa3\xc2\xad\xef\xbc\x8d\xe1\xa0\x8c\xe2\x84\xac\xef\xb8\x80S\xe2\x81\xa4\xf0\x9d\x94\xb0\xf3\xa0\x87\xafFFL", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("x\xcd\x8fN\xe2\x80\x8b-\xc2\xad-\xe1\xa0\x8cB\xef\xb8\x80S\xe2\x81\xa4s\xf3\xa0\x87\xafFFL", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("\xcb\xa3\xcd\x8f\xe2\x84\x95\xe2\x80\x8b\xef\xb9\xa3\xc2\xad\xef\xbc\x8d\xe1\xa0\x8c\xe2\x84\xac\xef\xb8\x80s\xe2\x81\xa4\xf0\x9d\x94\xb0\xf3\xa0\x87\xafffl", "\xe5\xa4\xa1\xe5\xa4\x9e\xe5\xa4\x9c\xe5\xa4\x99"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b.", "123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c", "123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a", "123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a.", "123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("\xc3\xa41234567890123456789012345678901234567890123456789012345", "\xc3\xa41234567890123456789012345678901234567890123456789012345"); } +test { try toUnicodePass("a\xcc\x881234567890123456789012345678901234567890123456789012345", "\xc3\xa41234567890123456789012345678901234567890123456789012345"); } +test { try toUnicodePass("A\xcc\x881234567890123456789012345678901234567890123456789012345", "\xc3\xa41234567890123456789012345678901234567890123456789012345"); } +test { try toUnicodePass("\xc3\x841234567890123456789012345678901234567890123456789012345", "\xc3\xa41234567890123456789012345678901234567890123456789012345"); } +test { try toUnicodePass("xn--1234567890123456789012345678901234567890123456789012345-9te", "\xc3\xa41234567890123456789012345678901234567890123456789012345"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890a\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890B", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x84123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890B", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890a\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890B.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x84123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890B.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890a\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901C", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x84123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901C", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890a\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789A", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x841234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789A", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.xn--12345678901234567890123456789012345678901234567890123456-fxe.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890a\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789A.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x841234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789A.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.xn--12345678901234567890123456789012345678901234567890123456-fxe.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890a\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890B", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x841234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890B", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.xn--12345678901234567890123456789012345678901234567890123456-fxe.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("A0", "a0"); } +test { try toUnicodePass("0A", "0a"); } +test { try toUnicodePass("\xd7\x90\xd7\x87", "\xd7\x90\xd7\x87"); } +test { try toUnicodePass("xn--vdbr", "\xd7\x90\xd7\x87"); } +test { try toUnicodePass("\xd7\x909\xd7\x87", "\xd7\x909\xd7\x87"); } +test { try toUnicodePass("xn--9-ihcz", "\xd7\x909\xd7\x87"); } +test { try toUnicodePass("\xd7\x90\xd7\xaa", "\xd7\x90\xd7\xaa"); } +test { try toUnicodePass("xn--4db6c", "\xd7\x90\xd7\xaa"); } +test { try toUnicodePass("\xd7\x90\xd7\xb3\xd7\xaa", "\xd7\x90\xd7\xb3\xd7\xaa"); } +test { try toUnicodePass("xn--4db6c0a", "\xd7\x90\xd7\xb3\xd7\xaa"); } +test { try toUnicodePass("\xd7\x907\xd7\xaa", "\xd7\x907\xd7\xaa"); } +test { try toUnicodePass("xn--7-zhc3f", "\xd7\x907\xd7\xaa"); } +test { try toUnicodePass("\xd7\x90\xd9\xa7\xd7\xaa", "\xd7\x90\xd9\xa7\xd7\xaa"); } +test { try toUnicodePass("xn--4db6c6t", "\xd7\x90\xd9\xa7\xd7\xaa"); } +test { try toUnicodePass("\xe0\xae\xb9\xe0\xaf\x8d\xe2\x80\x8d", "\xe0\xae\xb9\xe0\xaf\x8d\xe2\x80\x8d"); } +test { try toUnicodePass("xn--dmc4b", "\xe0\xae\xb9\xe0\xaf\x8d"); } +test { try toUnicodePass("\xe0\xae\xb9\xe0\xaf\x8d", "\xe0\xae\xb9\xe0\xaf\x8d"); } +test { try toUnicodePass("xn--dmc4b194h", "\xe0\xae\xb9\xe0\xaf\x8d\xe2\x80\x8d"); } +test { try toUnicodePass("xn--dmc", "\xe0\xae\xb9"); } +test { try toUnicodePass("\xe0\xae\xb9", "\xe0\xae\xb9"); } +test { try toUnicodePass("\xe0\xae\xb9\xe0\xaf\x8d\xe2\x80\x8c", "\xe0\xae\xb9\xe0\xaf\x8d\xe2\x80\x8c"); } +test { try toUnicodePass("xn--dmc4by94h", "\xe0\xae\xb9\xe0\xaf\x8d\xe2\x80\x8c"); } +test { try toUnicodePass("\xd9\x84\xd9\xb0\xe2\x80\x8c\xdb\xad\xdb\xaf", "\xd9\x84\xd9\xb0\xe2\x80\x8c\xdb\xad\xdb\xaf"); } +test { try toUnicodePass("xn--ghb2gxqia", "\xd9\x84\xd9\xb0\xdb\xad\xdb\xaf"); } +test { try toUnicodePass("\xd9\x84\xd9\xb0\xdb\xad\xdb\xaf", "\xd9\x84\xd9\xb0\xdb\xad\xdb\xaf"); } +test { try toUnicodePass("xn--ghb2gxqia7523a", "\xd9\x84\xd9\xb0\xe2\x80\x8c\xdb\xad\xdb\xaf"); } +test { try toUnicodePass("\xd9\x84\xd9\xb0\xe2\x80\x8c\xdb\xaf", "\xd9\x84\xd9\xb0\xe2\x80\x8c\xdb\xaf"); } +test { try toUnicodePass("xn--ghb2g3q", "\xd9\x84\xd9\xb0\xdb\xaf"); } +test { try toUnicodePass("\xd9\x84\xd9\xb0\xdb\xaf", "\xd9\x84\xd9\xb0\xdb\xaf"); } +test { try toUnicodePass("xn--ghb2g3qq34f", "\xd9\x84\xd9\xb0\xe2\x80\x8c\xdb\xaf"); } +test { try toUnicodePass("\xd9\x84\xe2\x80\x8c\xdb\xad\xdb\xaf", "\xd9\x84\xe2\x80\x8c\xdb\xad\xdb\xaf"); } +test { try toUnicodePass("xn--ghb25aga", "\xd9\x84\xdb\xad\xdb\xaf"); } +test { try toUnicodePass("\xd9\x84\xdb\xad\xdb\xaf", "\xd9\x84\xdb\xad\xdb\xaf"); } +test { try toUnicodePass("xn--ghb25aga828w", "\xd9\x84\xe2\x80\x8c\xdb\xad\xdb\xaf"); } +test { try toUnicodePass("\xd9\x84\xe2\x80\x8c\xdb\xaf", "\xd9\x84\xe2\x80\x8c\xdb\xaf"); } +test { try toUnicodePass("xn--ghb65a", "\xd9\x84\xdb\xaf"); } +test { try toUnicodePass("\xd9\x84\xdb\xaf", "\xd9\x84\xdb\xaf"); } +test { try toUnicodePass("xn--ghb65a953d", "\xd9\x84\xe2\x80\x8c\xdb\xaf"); } +test { try toUnicodePass("xn--ghb2gxq", "\xd9\x84\xd9\xb0\xdb\xad"); } +test { try toUnicodePass("\xd9\x84\xd9\xb0\xdb\xad", "\xd9\x84\xd9\xb0\xdb\xad"); } +test { try toUnicodePass("xn--cmba", "\xdb\xaf\xdb\xaf"); } +test { try toUnicodePass("\xdb\xaf\xdb\xaf", "\xdb\xaf\xdb\xaf"); } +test { try toUnicodePass("xn--ghb", "\xd9\x84"); } +test { try toUnicodePass("\xd9\x84", "\xd9\x84"); } +test { try toUnicodePass("ascii", "ascii"); } +test { try toUnicodePass("unicode.org", "unicode.org"); } +test { try toUnicodePass("\xef\xa5\x91\xf0\xaf\xa1\xa8\xf0\xaf\xa1\xb4\xf0\xaf\xa4\x9f\xf0\xaf\xa5\x9f\xf0\xaf\xa6\xbf", "\xe9\x99\x8b\xe3\x9b\xbc\xe5\xbd\x93\xf0\xa4\x8e\xab\xe7\xab\xae\xe4\x97\x97"); } +test { try toUnicodePass("\xe9\x99\x8b\xe3\x9b\xbc\xe5\xbd\x93\xf0\xa4\x8e\xab\xe7\xab\xae\xe4\x97\x97", "\xe9\x99\x8b\xe3\x9b\xbc\xe5\xbd\x93\xf0\xa4\x8e\xab\xe7\xab\xae\xe4\x97\x97"); } +test { try toUnicodePass("xn--snl253bgitxhzwu2arn60c", "\xe9\x99\x8b\xe3\x9b\xbc\xe5\xbd\x93\xf0\xa4\x8e\xab\xe7\xab\xae\xe4\x97\x97"); } +test { try toUnicodePass("\xe9\x9b\xbb\xf0\xa1\x8d\xaa\xe5\xbc\xb3\xe4\x8e\xab\xe7\xaa\xae\xe4\xb5\x97", "\xe9\x9b\xbb\xf0\xa1\x8d\xaa\xe5\xbc\xb3\xe4\x8e\xab\xe7\xaa\xae\xe4\xb5\x97"); } +test { try toUnicodePass("xn--kbo60w31ob3z6t3av9z5b", "\xe9\x9b\xbb\xf0\xa1\x8d\xaa\xe5\xbc\xb3\xe4\x8e\xab\xe7\xaa\xae\xe4\xb5\x97"); } +test { try toUnicodePass("xn--A-1ga", "a\xc3\xb6"); } +test { try toUnicodePass("a\xc3\xb6", "a\xc3\xb6"); } +test { try toUnicodePass("ao\xcc\x88", "a\xc3\xb6"); } +test { try toUnicodePass("AO\xcc\x88", "a\xc3\xb6"); } +test { try toUnicodePass("A\xc3\x96", "a\xc3\xb6"); } +test { try toUnicodePass("A\xc3\xb6", "a\xc3\xb6"); } +test { try toUnicodePass("Ao\xcc\x88", "a\xc3\xb6"); } +test { try toUnicodePass("\xef\xbc\x9d\xcc\xb8", "\xe2\x89\xa0"); } +test { try toUnicodePass("\xe2\x89\xa0", "\xe2\x89\xa0"); } +test { try toUnicodePass("=\xcc\xb8", "\xe2\x89\xa0"); } +test { try toUnicodePass("xn--1ch", "\xe2\x89\xa0"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x84123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x84123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x88123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x84123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa4123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901c"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x841234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x841234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a.", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789a."); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890A\xcc\x881234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\x841234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b", "123456789012345678901234567890123456789012345678901234567890123.1234567890\xc3\xa41234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890b"); } +test { try toUnicodePass("\xea\xa1\xa3.\xdf\x8f", "\xea\xa1\xa3.\xdf\x8f"); } +test { try toUnicodePass("xn--8c9a.xn--qsb", "\xea\xa1\xa3.\xdf\x8f"); } +test { try toUnicodePass("xn--jbf911clb.xn----p9j493ivi4l", "\xe2\x89\xa0\xe1\xa2\x99\xe2\x89\xaf.\xec\x86\xa3-\xe1\xa1\xb4\xe2\xb4\x80"); } +test { try toUnicodePass("\xe2\x89\xa0\xe1\xa2\x99\xe2\x89\xaf.\xec\x86\xa3-\xe1\xa1\xb4\xe2\xb4\x80", "\xe2\x89\xa0\xe1\xa2\x99\xe2\x89\xaf.\xec\x86\xa3-\xe1\xa1\xb4\xe2\xb4\x80"); } +test { try toUnicodePass("=\xcc\xb8\xe1\xa2\x99>\xcc\xb8.\xe1\x84\x89\xe1\x85\xa9\xe1\x86\xbe-\xe1\xa1\xb4\xe2\xb4\x80", "\xe2\x89\xa0\xe1\xa2\x99\xe2\x89\xaf.\xec\x86\xa3-\xe1\xa1\xb4\xe2\xb4\x80"); } +test { try toUnicodePass("=\xcc\xb8\xe1\xa2\x99>\xcc\xb8.\xe1\x84\x89\xe1\x85\xa9\xe1\x86\xbe-\xe1\xa1\xb4\xe1\x82\xa0", "\xe2\x89\xa0\xe1\xa2\x99\xe2\x89\xaf.\xec\x86\xa3-\xe1\xa1\xb4\xe2\xb4\x80"); } +test { try toUnicodePass("\xe2\x89\xa0\xe1\xa2\x99\xe2\x89\xaf.\xec\x86\xa3-\xe1\xa1\xb4\xe1\x82\xa0", "\xe2\x89\xa0\xe1\xa2\x99\xe2\x89\xaf.\xec\x86\xa3-\xe1\xa1\xb4\xe2\xb4\x80"); } +test { try toUnicodePass("\xe7\xb9\xb1\xf0\x91\x96\xbf\xe2\x80\x8d.8\xe3\x80\x82", "\xe7\xb9\xb1\xf0\x91\x96\xbf\xe2\x80\x8d.8."); } +test { try toUnicodePass("xn--gl0as212a.i.", "\xe7\xb9\xb1\xf0\x91\x96\xbf.i."); } +test { try toUnicodePass("\xe7\xb9\xb1\xf0\x91\x96\xbf.i.", "\xe7\xb9\xb1\xf0\x91\x96\xbf.i."); } +test { try toUnicodePass("\xe7\xb9\xb1\xf0\x91\x96\xbf.I.", "\xe7\xb9\xb1\xf0\x91\x96\xbf.i."); } +test { try toUnicodePass("xn--1ug6928ac48e.i.", "\xe7\xb9\xb1\xf0\x91\x96\xbf\xe2\x80\x8d.i."); } +test { try toUnicodePass("\xe7\xb9\xb1\xf0\x91\x96\xbf\xe2\x80\x8d.i.", "\xe7\xb9\xb1\xf0\x91\x96\xbf\xe2\x80\x8d.i."); } +test { try toUnicodePass("\xe7\xb9\xb1\xf0\x91\x96\xbf\xe2\x80\x8d.I.", "\xe7\xb9\xb1\xf0\x91\x96\xbf\xe2\x80\x8d.i."); } +test { try toUnicodePass("xn--ss-59d.", "ss\xdb\xab."); } +test { try toUnicodePass("ss\xdb\xab.", "ss\xdb\xab."); } +test { try toUnicodePass("SS\xdb\xab.", "ss\xdb\xab."); } +test { try toUnicodePass("Ss\xdb\xab.", "ss\xdb\xab."); } +test { try toUnicodePass("\xf0\x9e\xa4\xb7.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd8\xa4", "\xf0\x9e\xa4\xb7.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd8\xa4"); } +test { try toUnicodePass("\xf0\x9e\xa4\xb7.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd9\x88\xd9\x94", "\xf0\x9e\xa4\xb7.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd8\xa4"); } +test { try toUnicodePass("\xf0\x9e\xa4\x95.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd9\x88\xd9\x94", "\xf0\x9e\xa4\xb7.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd8\xa4"); } +test { try toUnicodePass("\xf0\x9e\xa4\x95.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd8\xa4", "\xf0\x9e\xa4\xb7.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd8\xa4"); } +test { try toUnicodePass("xn--ve6h.xn--jgb1694kz0b2176a", "\xf0\x9e\xa4\xb7.\xf0\x90\xae\x90\xf0\x9e\xa2\x81\xf0\x90\xb9\xa0\xd8\xa4"); } +test { try toUnicodePass("\xf0\x9e\xa4\xa5\xf3\xa0\x85\xae\xef\xbc\x8e\xe1\xa1\x84\xe1\x82\xae", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\xa5\xf3\xa0\x85\xae.\xe1\xa1\x84\xe1\x82\xae", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\xa5\xf3\xa0\x85\xae.\xe1\xa1\x84\xe2\xb4\x8e", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\x83\xf3\xa0\x85\xae.\xe1\xa1\x84\xe1\x82\xae", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\x83\xf3\xa0\x85\xae.\xe1\xa1\x84\xe2\xb4\x8e", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("xn--de6h.xn--37e857h", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\x83.\xe1\xa1\x84\xe1\x82\xae", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\x83.\xe1\xa1\x84\xe2\xb4\x8e", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\xa5\xf3\xa0\x85\xae\xef\xbc\x8e\xe1\xa1\x84\xe2\xb4\x8e", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\x83\xf3\xa0\x85\xae\xef\xbc\x8e\xe1\xa1\x84\xe1\x82\xae", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\x83\xf3\xa0\x85\xae\xef\xbc\x8e\xe1\xa1\x84\xe2\xb4\x8e", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe1\x82\xae", "\xf0\x9e\xa4\xa5.\xe1\xa1\x84\xe2\xb4\x8e"); } +test { try toUnicodePass("xn--9ob.xn--4xa", "\xdd\x96.\xcf\x83"); } +test { try toUnicodePass("\xdd\x96.\xcf\x83", "\xdd\x96.\xcf\x83"); } +test { try toUnicodePass("\xdd\x96.\xce\xa3", "\xdd\x96.\xcf\x83"); } +test { try toUnicodePass("\xc3\x9f\xef\xbd\xa1\xf0\x90\x8b\xb3\xe1\x82\xac\xe0\xbe\xb8", "\xc3\x9f.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("\xc3\x9f\xe3\x80\x82\xf0\x90\x8b\xb3\xe1\x82\xac\xe0\xbe\xb8", "\xc3\x9f.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("\xc3\x9f\xe3\x80\x82\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8", "\xc3\x9f.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("SS\xe3\x80\x82\xf0\x90\x8b\xb3\xe1\x82\xac\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("ss\xe3\x80\x82\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("Ss\xe3\x80\x82\xf0\x90\x8b\xb3\xe1\x82\xac\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("ss.xn--lgd921mvv0m", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("SS.\xf0\x90\x8b\xb3\xe1\x82\xac\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("Ss.\xf0\x90\x8b\xb3\xe1\x82\xac\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("xn--zca.xn--lgd921mvv0m", "\xc3\x9f.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("\xc3\x9f.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8", "\xc3\x9f.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("\xc3\x9f\xef\xbd\xa1\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8", "\xc3\x9f.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("SS\xef\xbd\xa1\xf0\x90\x8b\xb3\xe1\x82\xac\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("ss\xef\xbd\xa1\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("Ss\xef\xbd\xa1\xf0\x90\x8b\xb3\xe1\x82\xac\xe0\xbe\xb8", "ss.\xf0\x90\x8b\xb3\xe2\xb4\x8c\xe0\xbe\xb8"); } +test { try toUnicodePass("\xe1\x9a\xad\xef\xbd\xa1\xf0\x9d\x8c\xa0\xc3\x9f\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0\xc3\x9f\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad\xe3\x80\x82\xf0\x9d\x8c\xa0\xc3\x9f\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0\xc3\x9f\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad\xe3\x80\x82\xf0\x9d\x8c\xa0SS\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad\xe3\x80\x82\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad\xe3\x80\x82\xf0\x9d\x8c\xa0Ss\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("xn--hwe.xn--ss-ci1ub261a", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad.\xf0\x9d\x8c\xa0SS\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad.\xf0\x9d\x8c\xa0Ss\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("xn--hwe.xn--zca4946pblnc", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0\xc3\x9f\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad.\xf0\x9d\x8c\xa0\xc3\x9f\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0\xc3\x9f\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad\xef\xbd\xa1\xf0\x9d\x8c\xa0SS\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad\xef\xbd\xa1\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xe1\x9a\xad\xef\xbd\xa1\xf0\x9d\x8c\xa0Ss\xf0\x96\xab\xb1", "\xe1\x9a\xad.\xf0\x9d\x8c\xa0ss\xf0\x96\xab\xb1"); } +test { try toUnicodePass("\xf0\x9e\xa5\x93\xef\xbc\x8e\xdc\x98", "\xf0\x9e\xa5\x93.\xdc\x98"); } +test { try toUnicodePass("\xf0\x9e\xa5\x93.\xdc\x98", "\xf0\x9e\xa5\x93.\xdc\x98"); } +test { try toUnicodePass("xn--of6h.xn--inb", "\xf0\x9e\xa5\x93.\xdc\x98"); } +test { try toUnicodePass("\xe1\x82\xba\xf0\x90\x8b\xb8\xf3\xa0\x84\x84\xe3\x80\x82\xf0\x9d\x9f\x9d\xed\x9f\xb6\xe1\x80\xba", "\xe2\xb4\x9a\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba"); } +test { try toUnicodePass("\xe1\x82\xba\xf0\x90\x8b\xb8\xf3\xa0\x84\x84\xe3\x80\x825\xed\x9f\xb6\xe1\x80\xba", "\xe2\xb4\x9a\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba"); } +test { try toUnicodePass("\xe2\xb4\x9a\xf0\x90\x8b\xb8\xf3\xa0\x84\x84\xe3\x80\x825\xed\x9f\xb6\xe1\x80\xba", "\xe2\xb4\x9a\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba"); } +test { try toUnicodePass("xn--ilj2659d.xn--5-dug9054m", "\xe2\xb4\x9a\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba"); } +test { try toUnicodePass("\xe2\xb4\x9a\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba", "\xe2\xb4\x9a\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba"); } +test { try toUnicodePass("\xe1\x82\xba\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba", "\xe2\xb4\x9a\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba"); } +test { try toUnicodePass("\xe2\xb4\x9a\xf0\x90\x8b\xb8\xf3\xa0\x84\x84\xe3\x80\x82\xf0\x9d\x9f\x9d\xed\x9f\xb6\xe1\x80\xba", "\xe2\xb4\x9a\xf0\x90\x8b\xb8.5\xed\x9f\xb6\xe1\x80\xba"); } +test { try toUnicodePass("\xe2\x89\xa0.\xe1\xa0\xbf", "\xe2\x89\xa0.\xe1\xa0\xbf"); } +test { try toUnicodePass("=\xcc\xb8.\xe1\xa0\xbf", "\xe2\x89\xa0.\xe1\xa0\xbf"); } +test { try toUnicodePass("xn--1ch.xn--y7e", "\xe2\x89\xa0.\xe1\xa0\xbf"); } +test { try toUnicodePass("\xdc\xa3\xd6\xa3\xef\xbd\xa1\xe3\x8c\xaa", "\xdc\xa3\xd6\xa3.\xe3\x83\x8f\xe3\x82\xa4\xe3\x83\x84"); } +test { try toUnicodePass("\xdc\xa3\xd6\xa3\xe3\x80\x82\xe3\x83\x8f\xe3\x82\xa4\xe3\x83\x84", "\xdc\xa3\xd6\xa3.\xe3\x83\x8f\xe3\x82\xa4\xe3\x83\x84"); } +test { try toUnicodePass("xn--ucb18e.xn--eck4c5a", "\xdc\xa3\xd6\xa3.\xe3\x83\x8f\xe3\x82\xa4\xe3\x83\x84"); } +test { try toUnicodePass("\xdc\xa3\xd6\xa3.\xe3\x83\x8f\xe3\x82\xa4\xe3\x83\x84", "\xdc\xa3\xd6\xa3.\xe3\x83\x8f\xe3\x82\xa4\xe3\x83\x84"); } +test { try toUnicodePass("xn--skb", "\xda\xb9"); } +test { try toUnicodePass("\xda\xb9", "\xda\xb9"); } +test { try toUnicodePass("\xc3\x9f\xe0\xa7\x81\xe1\xb7\xad\xe3\x80\x82\xd8\xa08\xe2\x82\x85", "\xc3\x9f\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("\xc3\x9f\xe0\xa7\x81\xe1\xb7\xad\xe3\x80\x82\xd8\xa085", "\xc3\x9f\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("SS\xe0\xa7\x81\xe1\xb7\xad\xe3\x80\x82\xd8\xa085", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("ss\xe0\xa7\x81\xe1\xb7\xad\xe3\x80\x82\xd8\xa085", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("Ss\xe0\xa7\x81\xe1\xb7\xad\xe3\x80\x82\xd8\xa085", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("xn--ss-e2f077r.xn--85-psd", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("SS\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("Ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("xn--zca266bwrr.xn--85-psd", "\xc3\x9f\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("\xc3\x9f\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085", "\xc3\x9f\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("SS\xe0\xa7\x81\xe1\xb7\xad\xe3\x80\x82\xd8\xa08\xe2\x82\x85", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("ss\xe0\xa7\x81\xe1\xb7\xad\xe3\x80\x82\xd8\xa08\xe2\x82\x85", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("Ss\xe0\xa7\x81\xe1\xb7\xad\xe3\x80\x82\xd8\xa08\xe2\x82\x85", "ss\xe0\xa7\x81\xe1\xb7\xad.\xd8\xa085"); } +test { try toUnicodePass("\xef\xb8\x8d\xe0\xaa\x9b\xe3\x80\x82\xe5\xb5\xa8", "\xe0\xaa\x9b.\xe5\xb5\xa8"); } +test { try toUnicodePass("xn--6dc.xn--tot", "\xe0\xaa\x9b.\xe5\xb5\xa8"); } +test { try toUnicodePass("\xe0\xaa\x9b.\xe5\xb5\xa8", "\xe0\xaa\x9b.\xe5\xb5\xa8"); } +test { try toUnicodePass("xn--t6f5138v", "\xf0\xa6\x80\xbe\xe1\xb3\xa0"); } +test { try toUnicodePass("\xf0\xa6\x80\xbe\xe1\xb3\xa0", "\xf0\xa6\x80\xbe\xe1\xb3\xa0"); } +test { try toUnicodePass("xn--p8e.xn--1ch3a7084l", "\xe1\xa1\x99.\xe2\x89\xaf\xf0\x90\x8b\xb2\xe2\x89\xa0"); } +test { try toUnicodePass("\xe1\xa1\x99.\xe2\x89\xaf\xf0\x90\x8b\xb2\xe2\x89\xa0", "\xe1\xa1\x99.\xe2\x89\xaf\xf0\x90\x8b\xb2\xe2\x89\xa0"); } +test { try toUnicodePass("\xe1\xa1\x99.>\xcc\xb8\xf0\x90\x8b\xb2=\xcc\xb8", "\xe1\xa1\x99.\xe2\x89\xaf\xf0\x90\x8b\xb2\xe2\x89\xa0"); } +test { try toUnicodePass("xn--u4e969b.xn--1ch", "\xe2\x85\x8e\xe1\x9f\x92.\xe2\x89\xa0"); } +test { try toUnicodePass("\xe2\x85\x8e\xe1\x9f\x92.\xe2\x89\xa0", "\xe2\x85\x8e\xe1\x9f\x92.\xe2\x89\xa0"); } +test { try toUnicodePass("\xe2\x85\x8e\xe1\x9f\x92.=\xcc\xb8", "\xe2\x85\x8e\xe1\x9f\x92.\xe2\x89\xa0"); } +test { try toUnicodePass("\xe2\x84\xb2\xe1\x9f\x92.=\xcc\xb8", "\xe2\x85\x8e\xe1\x9f\x92.\xe2\x89\xa0"); } +test { try toUnicodePass("\xe2\x84\xb2\xe1\x9f\x92.\xe2\x89\xa0", "\xe2\x85\x8e\xe1\x9f\x92.\xe2\x89\xa0"); } +test { try toUnicodePass("xn--9-mfs8024b.", "9\xe9\x9a\x81\xe2\xaf\xae."); } +test { try toUnicodePass("9\xe9\x9a\x81\xe2\xaf\xae.", "9\xe9\x9a\x81\xe2\xaf\xae."); } +test { try toUnicodePass("xn--2ib43l.xn--te6h", "\xd9\xbd\xe0\xa5\x83.\xf0\x9e\xa4\xb5"); } +test { try toUnicodePass("\xd9\xbd\xe0\xa5\x83.\xf0\x9e\xa4\xb5", "\xd9\xbd\xe0\xa5\x83.\xf0\x9e\xa4\xb5"); } +test { try toUnicodePass("\xd9\xbd\xe0\xa5\x83.\xf0\x9e\xa4\x93", "\xd9\xbd\xe0\xa5\x83.\xf0\x9e\xa4\xb5"); } +test { try toUnicodePass("\xea\xa7\x90\xd3\x80\xe1\xae\xaa\xe0\xa3\xb6\xef\xbc\x8e\xeb\x88\xb5", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("\xea\xa7\x90\xd3\x80\xe1\xae\xaa\xe0\xa3\xb6\xef\xbc\x8e\xe1\x84\x82\xe1\x85\xaf\xe1\x86\xbc", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("\xea\xa7\x90\xd3\x80\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("\xea\xa7\x90\xd3\x80\xe1\xae\xaa\xe0\xa3\xb6.\xe1\x84\x82\xe1\x85\xaf\xe1\x86\xbc", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xe1\x84\x82\xe1\x85\xaf\xe1\x86\xbc", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("xn--s5a04sn4u297k.xn--2e1b", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6\xef\xbc\x8e\xe1\x84\x82\xe1\x85\xaf\xe1\x86\xbc", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6\xef\xbc\x8e\xeb\x88\xb5", "\xea\xa7\x90\xd3\x8f\xe1\xae\xaa\xe0\xa3\xb6.\xeb\x88\xb5"); } +test { try toUnicodePass("xn--9hb7344k.", "\xf0\x90\xab\x87\xd9\xa1."); } +test { try toUnicodePass("\xf0\x90\xab\x87\xd9\xa1.", "\xf0\x90\xab\x87\xd9\xa1."); } +test { try toUnicodePass("\xdf\xa5.\xda\xb5", "\xdf\xa5.\xda\xb5"); } +test { try toUnicodePass("xn--dtb.xn--okb", "\xdf\xa5.\xda\xb5"); } +test { try toUnicodePass("xn--3e6h", "\xf0\x9e\xa4\xbf"); } +test { try toUnicodePass("\xf0\x9e\xa4\xbf", "\xf0\x9e\xa4\xbf"); } +test { try toUnicodePass("\xf0\x9e\xa4\x9d", "\xf0\x9e\xa4\xbf"); } +test { try toUnicodePass("\xda\xb9\xef\xbc\x8e\xe1\xa1\xb3\xe1\x85\x9f", "\xda\xb9.\xe1\xa1\xb3"); } +test { try toUnicodePass("\xda\xb9.\xe1\xa1\xb3\xe1\x85\x9f", "\xda\xb9.\xe1\xa1\xb3"); } +test { try toUnicodePass("xn--skb.xn--g9e", "\xda\xb9.\xe1\xa1\xb3"); } +test { try toUnicodePass("\xda\xb9.\xe1\xa1\xb3", "\xda\xb9.\xe1\xa1\xb3"); } +test { try toUnicodePass("xn--ss-4epx629f.xn--ifh802b6a", "ss\xea\xab\xb6\xe1\xa2\xa5.\xe2\x8a\xb6\xe2\xb4\xa1\xe2\xb4\x96"); } +test { try toUnicodePass("ss\xea\xab\xb6\xe1\xa2\xa5.\xe2\x8a\xb6\xe2\xb4\xa1\xe2\xb4\x96", "ss\xea\xab\xb6\xe1\xa2\xa5.\xe2\x8a\xb6\xe2\xb4\xa1\xe2\xb4\x96"); } +test { try toUnicodePass("SS\xea\xab\xb6\xe1\xa2\xa5.\xe2\x8a\xb6\xe1\x83\x81\xe1\x82\xb6", "ss\xea\xab\xb6\xe1\xa2\xa5.\xe2\x8a\xb6\xe2\xb4\xa1\xe2\xb4\x96"); } +test { try toUnicodePass("Ss\xea\xab\xb6\xe1\xa2\xa5.\xe2\x8a\xb6\xe1\x83\x81\xe2\xb4\x96", "ss\xea\xab\xb6\xe1\xa2\xa5.\xe2\x8a\xb6\xe2\xb4\xa1\xe2\xb4\x96"); } +test { try toUnicodePass("\xe2\x89\xa0\xe3\x80\x82\xf0\x9f\x9e\xb3\xf0\x9d\x9f\xb2", "\xe2\x89\xa0.\xf0\x9f\x9e\xb36"); } +test { try toUnicodePass("=\xcc\xb8\xe3\x80\x82\xf0\x9f\x9e\xb3\xf0\x9d\x9f\xb2", "\xe2\x89\xa0.\xf0\x9f\x9e\xb36"); } +test { try toUnicodePass("\xe2\x89\xa0\xe3\x80\x82\xf0\x9f\x9e\xb36", "\xe2\x89\xa0.\xf0\x9f\x9e\xb36"); } +test { try toUnicodePass("=\xcc\xb8\xe3\x80\x82\xf0\x9f\x9e\xb36", "\xe2\x89\xa0.\xf0\x9f\x9e\xb36"); } +test { try toUnicodePass("xn--1ch.xn--6-dl4s", "\xe2\x89\xa0.\xf0\x9f\x9e\xb36"); } +test { try toUnicodePass("\xe2\x89\xa0.\xf0\x9f\x9e\xb36", "\xe2\x89\xa0.\xf0\x9f\x9e\xb36"); } +test { try toUnicodePass("=\xcc\xb8.\xf0\x9f\x9e\xb36", "\xe2\x89\xa0.\xf0\x9f\x9e\xb36"); } +test { try toUnicodePass("j", "j"); } +test { try toUnicodePass("xn--rt6a.", "\xe9\xb1\x8a."); } +test { try toUnicodePass("\xe9\xb1\x8a.", "\xe9\xb1\x8a."); } +test { try toUnicodePass("xn--4-0bd15808a.", "\xf0\x9e\xa4\xba\xdf\x8c4."); } +test { try toUnicodePass("\xf0\x9e\xa4\xba\xdf\x8c4.", "\xf0\x9e\xa4\xba\xdf\x8c4."); } +test { try toUnicodePass("\xf0\x9e\xa4\x98\xdf\x8c4.", "\xf0\x9e\xa4\xba\xdf\x8c4."); } +test { try toUnicodePass("\xe2\xbe\x86\xef\xbc\x8e\xea\xa1\x88\xef\xbc\x95\xe2\x89\xaf\xc3\x9f", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xaf\xc3\x9f"); } +test { try toUnicodePass("\xe2\xbe\x86\xef\xbc\x8e\xea\xa1\x88\xef\xbc\x95>\xcc\xb8\xc3\x9f", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xaf\xc3\x9f"); } +test { try toUnicodePass("\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xaf\xc3\x9f", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xaf\xc3\x9f"); } +test { try toUnicodePass("\xe8\x88\x8c.\xea\xa1\x885>\xcc\xb8\xc3\x9f", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xaf\xc3\x9f"); } +test { try toUnicodePass("\xe8\x88\x8c.\xea\xa1\x885>\xcc\xb8SS", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafSS", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe8\x88\x8c.\xea\xa1\x885>\xcc\xb8ss", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe8\x88\x8c.\xea\xa1\x885>\xcc\xb8Ss", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafSs", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("xn--tc1a.xn--5ss-3m2a5009e", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("xn--tc1a.xn--5-qfa988w745i", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xaf\xc3\x9f"); } +test { try toUnicodePass("\xe2\xbe\x86\xef\xbc\x8e\xea\xa1\x88\xef\xbc\x95>\xcc\xb8SS", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe2\xbe\x86\xef\xbc\x8e\xea\xa1\x88\xef\xbc\x95\xe2\x89\xafSS", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe2\xbe\x86\xef\xbc\x8e\xea\xa1\x88\xef\xbc\x95\xe2\x89\xafss", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe2\xbe\x86\xef\xbc\x8e\xea\xa1\x88\xef\xbc\x95>\xcc\xb8ss", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe2\xbe\x86\xef\xbc\x8e\xea\xa1\x88\xef\xbc\x95>\xcc\xb8Ss", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xe2\xbe\x86\xef\xbc\x8e\xea\xa1\x88\xef\xbc\x95\xe2\x89\xafSs", "\xe8\x88\x8c.\xea\xa1\x885\xe2\x89\xafss"); } +test { try toUnicodePass("\xf0\x9e\xa4\xaa.\xcf\x82", "\xf0\x9e\xa4\xaa.\xcf\x82"); } +test { try toUnicodePass("\xf0\x9e\xa4\x88.\xce\xa3", "\xf0\x9e\xa4\xaa.\xcf\x83"); } +test { try toUnicodePass("\xf0\x9e\xa4\xaa.\xcf\x83", "\xf0\x9e\xa4\xaa.\xcf\x83"); } +test { try toUnicodePass("\xf0\x9e\xa4\x88.\xcf\x83", "\xf0\x9e\xa4\xaa.\xcf\x83"); } +test { try toUnicodePass("xn--ie6h.xn--4xa", "\xf0\x9e\xa4\xaa.\xcf\x83"); } +test { try toUnicodePass("\xf0\x9e\xa4\x88.\xcf\x82", "\xf0\x9e\xa4\xaa.\xcf\x82"); } +test { try toUnicodePass("xn--ie6h.xn--3xa", "\xf0\x9e\xa4\xaa.\xcf\x82"); } +test { try toUnicodePass("\xf0\x9e\xa4\xaa.\xce\xa3", "\xf0\x9e\xa4\xaa.\xcf\x83"); } +test { try toUnicodePass("xn--ilj.xn--4xa", "\xe2\xb4\x9a.\xcf\x83"); } +test { try toUnicodePass("\xe2\xb4\x9a.\xcf\x83", "\xe2\xb4\x9a.\xcf\x83"); } +test { try toUnicodePass("\xe1\x82\xba.\xce\xa3", "\xe2\xb4\x9a.\xcf\x83"); } +test { try toUnicodePass("\xe2\xb4\x9a.\xcf\x82", "\xe2\xb4\x9a.\xcf\x82"); } +test { try toUnicodePass("\xe1\x82\xba.\xcf\x82", "\xe2\xb4\x9a.\xcf\x82"); } +test { try toUnicodePass("xn--ilj.xn--3xa", "\xe2\xb4\x9a.\xcf\x82"); } +test { try toUnicodePass("\xe1\x82\xba.\xcf\x83", "\xe2\xb4\x9a.\xcf\x83"); } +test { try toUnicodePass("\xe6\xb7\xbd\xe3\x80\x82\xe1\xa0\xbe", "\xe6\xb7\xbd.\xe1\xa0\xbe"); } +test { try toUnicodePass("xn--34w.xn--x7e", "\xe6\xb7\xbd.\xe1\xa0\xbe"); } +test { try toUnicodePass("\xe6\xb7\xbd.\xe1\xa0\xbe", "\xe6\xb7\xbd.\xe1\xa0\xbe"); } +test { try toUnicodePass("\xea\xa1\xa0\xef\xbc\x8e\xdb\xb2", "\xea\xa1\xa0.\xdb\xb2"); } +test { try toUnicodePass("\xea\xa1\xa0.\xdb\xb2", "\xea\xa1\xa0.\xdb\xb2"); } +test { try toUnicodePass("xn--5c9a.xn--fmb", "\xea\xa1\xa0.\xdb\xb2"); } +test { try toUnicodePass("1.2h", "1.2h"); } +test { try toUnicodePass("xn--skjy82u.xn--gdh", "\xe2\xb4\x81\xe7\x95\x9d.\xe2\x89\xae"); } +test { try toUnicodePass("\xe2\xb4\x81\xe7\x95\x9d.\xe2\x89\xae", "\xe2\xb4\x81\xe7\x95\x9d.\xe2\x89\xae"); } +test { try toUnicodePass("\xe2\xb4\x81\xe7\x95\x9d.<\xcc\xb8", "\xe2\xb4\x81\xe7\x95\x9d.\xe2\x89\xae"); } +test { try toUnicodePass("\xe1\x82\xa1\xe7\x95\x9d.<\xcc\xb8", "\xe2\xb4\x81\xe7\x95\x9d.\xe2\x89\xae"); } +test { try toUnicodePass("\xe1\x82\xa1\xe7\x95\x9d.\xe2\x89\xae", "\xe2\xb4\x81\xe7\x95\x9d.\xe2\x89\xae"); } +test { try toUnicodePass("\xf0\x9f\x95\xbc\xef\xbc\x8e\xef\xbe\xa0", "\xf0\x9f\x95\xbc."); } +test { try toUnicodePass("\xf0\x9f\x95\xbc.\xe1\x85\xa0", "\xf0\x9f\x95\xbc."); } +test { try toUnicodePass("xn--my8h.", "\xf0\x9f\x95\xbc."); } +test { try toUnicodePass("\xf0\x9f\x95\xbc.", "\xf0\x9f\x95\xbc."); } +test { try toUnicodePass("\xcf\x82\xe1\x83\x85\xe3\x80\x82\xdd\x9a", "\xcf\x82\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("\xcf\x82\xe2\xb4\xa5\xe3\x80\x82\xdd\x9a", "\xcf\x82\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("\xce\xa3\xe1\x83\x85\xe3\x80\x82\xdd\x9a", "\xcf\x83\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("\xcf\x83\xe2\xb4\xa5\xe3\x80\x82\xdd\x9a", "\xcf\x83\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("\xce\xa3\xe2\xb4\xa5\xe3\x80\x82\xdd\x9a", "\xcf\x83\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("xn--4xa203s.xn--epb", "\xcf\x83\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("\xcf\x83\xe2\xb4\xa5.\xdd\x9a", "\xcf\x83\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("\xce\xa3\xe1\x83\x85.\xdd\x9a", "\xcf\x83\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("\xce\xa3\xe2\xb4\xa5.\xdd\x9a", "\xcf\x83\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("xn--3xa403s.xn--epb", "\xcf\x82\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("\xcf\x82\xe2\xb4\xa5.\xdd\x9a", "\xcf\x82\xe2\xb4\xa5.\xdd\x9a"); } +test { try toUnicodePass("xn--vkb.xn--08e172a", "\xda\xbc.\xe1\xba\x8f\xe1\xa1\xa4"); } +test { try toUnicodePass("\xda\xbc.\xe1\xba\x8f\xe1\xa1\xa4", "\xda\xbc.\xe1\xba\x8f\xe1\xa1\xa4"); } +test { try toUnicodePass("\xda\xbc.y\xcc\x87\xe1\xa1\xa4", "\xda\xbc.\xe1\xba\x8f\xe1\xa1\xa4"); } +test { try toUnicodePass("\xda\xbc.Y\xcc\x87\xe1\xa1\xa4", "\xda\xbc.\xe1\xba\x8f\xe1\xa1\xa4"); } +test { try toUnicodePass("\xda\xbc.\xe1\xba\x8e\xe1\xa1\xa4", "\xda\xbc.\xe1\xba\x8f\xe1\xa1\xa4"); } +test { try toUnicodePass("xn--pt9c.xn--0kjya", "\xf0\x90\xa9\x97.\xe2\xb4\x89\xe2\xb4\x95"); } +test { try toUnicodePass("\xf0\x90\xa9\x97.\xe2\xb4\x89\xe2\xb4\x95", "\xf0\x90\xa9\x97.\xe2\xb4\x89\xe2\xb4\x95"); } +test { try toUnicodePass("\xf0\x90\xa9\x97.\xe1\x82\xa9\xe1\x82\xb5", "\xf0\x90\xa9\x97.\xe2\xb4\x89\xe2\xb4\x95"); } +test { try toUnicodePass("\xf0\x90\xa9\x97.\xe1\x82\xa9\xe2\xb4\x95", "\xf0\x90\xa9\x97.\xe2\xb4\x89\xe2\xb4\x95"); } +test { try toUnicodePass("\xf0\xb2\xa4\xb120.\xe9\x9f\xb3.\xea\xa1\xa61.", "\xf0\xb2\xa4\xb120.\xe9\x9f\xb3.\xea\xa1\xa61."); } +test { try toUnicodePass("xn--20-9802c.xn--0w5a.xn--1-eg4e.", "\xf0\xb2\xa4\xb120.\xe9\x9f\xb3.\xea\xa1\xa61."); } +test { try toUnicodePass("\xe1\x82\xb5\xe3\x80\x82\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5\xe3\x80\x82\xdb\xb0<\xcc\xb8\xc3\x9f\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85"); } +test { try toUnicodePass("\xe2\xb4\x95\xe3\x80\x82\xdb\xb0<\xcc\xb8\xc3\x9f\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85"); } +test { try toUnicodePass("\xe2\xb4\x95\xe3\x80\x82\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5\xe3\x80\x82\xdb\xb0\xe2\x89\xaeSS\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5\xe3\x80\x82\xdb\xb0<\xcc\xb8SS\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe2\xb4\x95\xe3\x80\x82\xdb\xb0<\xcc\xb8ss\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe2\xb4\x95\xe3\x80\x82\xdb\xb0\xe2\x89\xaess\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5\xe3\x80\x82\xdb\xb0\xe2\x89\xaeSs\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5\xe3\x80\x82\xdb\xb0<\xcc\xb8Ss\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("xn--dlj.xn--ss-jbe65aw27i", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe2\xb4\x95.\xdb\xb0<\xcc\xb8ss\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5.\xdb\xb0<\xcc\xb8SS\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5.\xdb\xb0\xe2\x89\xaeSS\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5.\xdb\xb0\xe2\x89\xaeSs\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("\xe1\x82\xb5.\xdb\xb0<\xcc\xb8Ss\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xaess\xdd\x85"); } +test { try toUnicodePass("xn--dlj.xn--zca912alh227g", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85"); } +test { try toUnicodePass("\xe2\xb4\x95.\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85"); } +test { try toUnicodePass("\xe2\xb4\x95.\xdb\xb0<\xcc\xb8\xc3\x9f\xdd\x85", "\xe2\xb4\x95.\xdb\xb0\xe2\x89\xae\xc3\x9f\xdd\x85"); } +test { try toUnicodePass("xn--ge6h.xn--oc9a", "\xf0\x9e\xa4\xa8.\xea\xa1\x8f"); } +test { try toUnicodePass("\xf0\x9e\xa4\xa8.\xea\xa1\x8f", "\xf0\x9e\xa4\xa8.\xea\xa1\x8f"); } +test { try toUnicodePass("\xf0\x9e\xa4\x86.\xea\xa1\x8f", "\xf0\x9e\xa4\xa8.\xea\xa1\x8f"); } +test { try toUnicodePass("\xe9\xbd\x99--\xf0\x9d\x9f\xb0.\xc3\x9f", "\xe9\xbd\x99--4.\xc3\x9f"); } +test { try toUnicodePass("\xe9\xbd\x99--4.\xc3\x9f", "\xe9\xbd\x99--4.\xc3\x9f"); } +test { try toUnicodePass("\xe9\xbd\x99--4.SS", "\xe9\xbd\x99--4.ss"); } +test { try toUnicodePass("\xe9\xbd\x99--4.ss", "\xe9\xbd\x99--4.ss"); } +test { try toUnicodePass("\xe9\xbd\x99--4.Ss", "\xe9\xbd\x99--4.ss"); } +test { try toUnicodePass("xn----4-p16k.ss", "\xe9\xbd\x99--4.ss"); } +test { try toUnicodePass("xn----4-p16k.xn--zca", "\xe9\xbd\x99--4.\xc3\x9f"); } +test { try toUnicodePass("\xe9\xbd\x99--\xf0\x9d\x9f\xb0.SS", "\xe9\xbd\x99--4.ss"); } +test { try toUnicodePass("\xe9\xbd\x99--\xf0\x9d\x9f\xb0.ss", "\xe9\xbd\x99--4.ss"); } +test { try toUnicodePass("\xe9\xbd\x99--\xf0\x9d\x9f\xb0.Ss", "\xe9\xbd\x99--4.ss"); } +test { try toUnicodePass("xn--9-i0j5967eg3qz.ss", "\xf0\xb2\xae\x9a9\xea\x8d\xa9\xe1\x9f\x93.ss"); } +test { try toUnicodePass("\xf0\xb2\xae\x9a9\xea\x8d\xa9\xe1\x9f\x93.ss", "\xf0\xb2\xae\x9a9\xea\x8d\xa9\xe1\x9f\x93.ss"); } +test { try toUnicodePass("\xf0\xb2\xae\x9a9\xea\x8d\xa9\xe1\x9f\x93.SS", "\xf0\xb2\xae\x9a9\xea\x8d\xa9\xe1\x9f\x93.ss"); } +test { try toUnicodePass("\xea\x97\xb7\xf0\x91\x86\x80.\xdd\x9d\xf0\x90\xa9\x92", "\xea\x97\xb7\xf0\x91\x86\x80.\xdd\x9d\xf0\x90\xa9\x92"); } +test { try toUnicodePass("xn--ju8a625r.xn--hpb0073k", "\xea\x97\xb7\xf0\x91\x86\x80.\xdd\x9d\xf0\x90\xa9\x92"); } +test { try toUnicodePass("\xcf\x82.\xd9\x81\xd9\x85\xd9\x8a\xf0\x9f\x9e\x9b1.", "\xcf\x82.\xd9\x81\xd9\x85\xd9\x8a\xf0\x9f\x9e\x9b1."); } +test { try toUnicodePass("\xce\xa3.\xd9\x81\xd9\x85\xd9\x8a\xf0\x9f\x9e\x9b1.", "\xcf\x83.\xd9\x81\xd9\x85\xd9\x8a\xf0\x9f\x9e\x9b1."); } +test { try toUnicodePass("\xcf\x83.\xd9\x81\xd9\x85\xd9\x8a\xf0\x9f\x9e\x9b1.", "\xcf\x83.\xd9\x81\xd9\x85\xd9\x8a\xf0\x9f\x9e\x9b1."); } +test { try toUnicodePass("xn--4xa.xn--1-gocmu97674d.", "\xcf\x83.\xd9\x81\xd9\x85\xd9\x8a\xf0\x9f\x9e\x9b1."); } +test { try toUnicodePass("xn--3xa.xn--1-gocmu97674d.", "\xcf\x82.\xd9\x81\xd9\x85\xd9\x8a\xf0\x9f\x9e\x9b1."); } +test { try toUnicodePass("xn--hva754s.", "\xe2\xb4\x96\xcd\xa6."); } +test { try toUnicodePass("\xe2\xb4\x96\xcd\xa6.", "\xe2\xb4\x96\xcd\xa6."); } +test { try toUnicodePass("\xe1\x82\xb6\xcd\xa6.", "\xe2\xb4\x96\xcd\xa6."); } +test { try toUnicodePass("xn--hzb.xn--ukj4430l", "\xe0\xa2\xbb.\xe2\xb4\x83\xf0\x9e\x80\x92"); } +test { try toUnicodePass("\xe0\xa2\xbb.\xe2\xb4\x83\xf0\x9e\x80\x92", "\xe0\xa2\xbb.\xe2\xb4\x83\xf0\x9e\x80\x92"); } +test { try toUnicodePass("\xe0\xa2\xbb.\xe1\x82\xa3\xf0\x9e\x80\x92", "\xe0\xa2\xbb.\xe2\xb4\x83\xf0\x9e\x80\x92"); } +test { try toUnicodePass("xn--p9ut19m.xn----mck373i", "\xe6\x94\x8c\xea\xaf\xad.\xe1\xa2\x96-\xe2\xb4\x98"); } +test { try toUnicodePass("\xe6\x94\x8c\xea\xaf\xad.\xe1\xa2\x96-\xe2\xb4\x98", "\xe6\x94\x8c\xea\xaf\xad.\xe1\xa2\x96-\xe2\xb4\x98"); } +test { try toUnicodePass("\xe6\x94\x8c\xea\xaf\xad.\xe1\xa2\x96-\xe1\x82\xb8", "\xe6\x94\x8c\xea\xaf\xad.\xe1\xa2\x96-\xe2\xb4\x98"); } +test { try toUnicodePass("xn--9r8a.16.xn--3-nyc0117m", "\xea\x96\xa8.16.3\xed\x88\x92\xdb\xb3"); } +test { try toUnicodePass("\xea\x96\xa8.16.3\xed\x88\x92\xdb\xb3", "\xea\x96\xa8.16.3\xed\x88\x92\xdb\xb3"); } +test { try toUnicodePass("\xea\x96\xa8.16.3\xe1\x84\x90\xe1\x85\xad\xe1\x86\xa9\xdb\xb3", "\xea\x96\xa8.16.3\xed\x88\x92\xdb\xb3"); } +test { try toUnicodePass("xn--1-5bt6845n.", "1\xf0\x9d\xa8\x99\xe2\xb8\x96."); } +test { try toUnicodePass("1\xf0\x9d\xa8\x99\xe2\xb8\x96.", "1\xf0\x9d\xa8\x99\xe2\xb8\x96."); } +test { try toUnicodePass("xn--ss-f4j.b.", "ss\xe1\x80\xba.b."); } +test { try toUnicodePass("ss\xe1\x80\xba.b.", "ss\xe1\x80\xba.b."); } +test { try toUnicodePass("SS\xe1\x80\xba.B.", "ss\xe1\x80\xba.b."); } +test { try toUnicodePass("Ss\xe1\x80\xba.b.", "ss\xe1\x80\xba.b."); } +test { try toUnicodePass("SS\xe1\x80\xba.b.", "ss\xe1\x80\xba.b."); } +test { try toUnicodePass("\xdb\x8c\xf0\x90\xa8\xbf\xef\xbc\x8e\xc3\x9f\xe0\xbe\x84\xf0\x91\x8d\xac", "\xdb\x8c\xf0\x90\xa8\xbf.\xc3\x9f\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("\xdb\x8c\xf0\x90\xa8\xbf.\xc3\x9f\xe0\xbe\x84\xf0\x91\x8d\xac", "\xdb\x8c\xf0\x90\xa8\xbf.\xc3\x9f\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("\xdb\x8c\xf0\x90\xa8\xbf.SS\xe0\xbe\x84\xf0\x91\x8d\xac", "\xdb\x8c\xf0\x90\xa8\xbf.ss\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("\xdb\x8c\xf0\x90\xa8\xbf.ss\xe0\xbe\x84\xf0\x91\x8d\xac", "\xdb\x8c\xf0\x90\xa8\xbf.ss\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("xn--clb2593k.xn--ss-toj6092t", "\xdb\x8c\xf0\x90\xa8\xbf.ss\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("xn--clb2593k.xn--zca216edt0r", "\xdb\x8c\xf0\x90\xa8\xbf.\xc3\x9f\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("\xdb\x8c\xf0\x90\xa8\xbf\xef\xbc\x8eSS\xe0\xbe\x84\xf0\x91\x8d\xac", "\xdb\x8c\xf0\x90\xa8\xbf.ss\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("\xdb\x8c\xf0\x90\xa8\xbf\xef\xbc\x8ess\xe0\xbe\x84\xf0\x91\x8d\xac", "\xdb\x8c\xf0\x90\xa8\xbf.ss\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("\xdb\x8c\xf0\x90\xa8\xbf.Ss\xe0\xbe\x84\xf0\x91\x8d\xac", "\xdb\x8c\xf0\x90\xa8\xbf.ss\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("\xdb\x8c\xf0\x90\xa8\xbf\xef\xbc\x8eSs\xe0\xbe\x84\xf0\x91\x8d\xac", "\xdb\x8c\xf0\x90\xa8\xbf.ss\xe0\xbe\x84\xf0\x91\x8d\xac"); } +test { try toUnicodePass("xn--8-ngo.", "8\xe2\x89\xae."); } +test { try toUnicodePass("8\xe2\x89\xae.", "8\xe2\x89\xae."); } +test { try toUnicodePass("8<\xcc\xb8.", "8\xe2\x89\xae."); } +test { try toUnicodePass("\xe7\xbe\x9a\xef\xbd\xa1\xe2\x89\xaf", "\xe7\xbe\x9a.\xe2\x89\xaf"); } +test { try toUnicodePass("\xe7\xbe\x9a\xef\xbd\xa1>\xcc\xb8", "\xe7\xbe\x9a.\xe2\x89\xaf"); } +test { try toUnicodePass("\xe7\xbe\x9a\xe3\x80\x82\xe2\x89\xaf", "\xe7\xbe\x9a.\xe2\x89\xaf"); } +test { try toUnicodePass("\xe7\xbe\x9a\xe3\x80\x82>\xcc\xb8", "\xe7\xbe\x9a.\xe2\x89\xaf"); } +test { try toUnicodePass("xn--xt0a.xn--hdh", "\xe7\xbe\x9a.\xe2\x89\xaf"); } +test { try toUnicodePass("\xe7\xbe\x9a.\xe2\x89\xaf", "\xe7\xbe\x9a.\xe2\x89\xaf"); } +test { try toUnicodePass("\xe7\xbe\x9a.>\xcc\xb8", "\xe7\xbe\x9a.\xe2\x89\xaf"); } +test { try toUnicodePass("xn--ye6h", "\xf0\x9e\xa4\xba"); } +test { try toUnicodePass("\xf0\x9e\xa4\xba", "\xf0\x9e\xa4\xba"); } +test { try toUnicodePass("\xf0\x9e\xa4\x98", "\xf0\x9e\xa4\xba"); } +test { try toUnicodePass("\xf0\x9d\x9f\x9b\xef\xbc\x8e\xef\xa7\xb8", "3.\xe7\xac\xa0"); } +test { try toUnicodePass("\xf0\x9d\x9f\x9b\xef\xbc\x8e\xe7\xac\xa0", "3.\xe7\xac\xa0"); } +test { try toUnicodePass("3.\xe7\xac\xa0", "3.\xe7\xac\xa0"); } +test { try toUnicodePass("3.xn--6vz", "3.\xe7\xac\xa0"); } +test { try toUnicodePass("xn--1ch.", "\xe2\x89\xa0."); } +test { try toUnicodePass("\xe2\x89\xa0.", "\xe2\x89\xa0."); } +test { try toUnicodePass("=\xcc\xb8.", "\xe2\x89\xa0."); } +test { try toUnicodePass("f", "f"); } +test { try toUnicodePass("xn--9bm.ss", "\xe3\xa8\xb2.ss"); } +test { try toUnicodePass("\xe3\xa8\xb2.ss", "\xe3\xa8\xb2.ss"); } +test { try toUnicodePass("\xe3\xa8\xb2.SS", "\xe3\xa8\xb2.ss"); } +test { try toUnicodePass("\xe3\xa8\xb2.Ss", "\xe3\xa8\xb2.ss"); } +test { try toUnicodePass("\xf0\x9d\x9f\x8e\xe3\x80\x82\xe7\x94\xaf", "0.\xe7\x94\xaf"); } +test { try toUnicodePass("0\xe3\x80\x82\xe7\x94\xaf", "0.\xe7\x94\xaf"); } +test { try toUnicodePass("0.xn--qny", "0.\xe7\x94\xaf"); } +test { try toUnicodePass("0.\xe7\x94\xaf", "0.\xe7\x94\xaf"); } +test { try toUnicodePass("\xf0\x9f\x82\xb4\xe1\x82\xab.\xe2\x89\xae", "\xf0\x9f\x82\xb4\xe2\xb4\x8b.\xe2\x89\xae"); } +test { try toUnicodePass("\xf0\x9f\x82\xb4\xe1\x82\xab.<\xcc\xb8", "\xf0\x9f\x82\xb4\xe2\xb4\x8b.\xe2\x89\xae"); } +test { try toUnicodePass("\xf0\x9f\x82\xb4\xe2\xb4\x8b.<\xcc\xb8", "\xf0\x9f\x82\xb4\xe2\xb4\x8b.\xe2\x89\xae"); } +test { try toUnicodePass("\xf0\x9f\x82\xb4\xe2\xb4\x8b.\xe2\x89\xae", "\xf0\x9f\x82\xb4\xe2\xb4\x8b.\xe2\x89\xae"); } +test { try toUnicodePass("xn--2kj7565l.xn--gdh", "\xf0\x9f\x82\xb4\xe2\xb4\x8b.\xe2\x89\xae"); } +test { try toUnicodePass("xn--gky8837e.", "\xe7\x92\xbc\xf0\x9d\xa8\xad."); } +test { try toUnicodePass("\xe7\x92\xbc\xf0\x9d\xa8\xad.", "\xe7\x92\xbc\xf0\x9d\xa8\xad."); } +test { try toUnicodePass("xn--157b.xn--gnb", "\xed\x8a\x9b.\xdc\x96"); } +test { try toUnicodePass("\xed\x8a\x9b.\xdc\x96", "\xed\x8a\x9b.\xdc\x96"); } +test { try toUnicodePass("\xe1\x84\x90\xe1\x85\xb1\xe1\x87\x82.\xdc\x96", "\xed\x8a\x9b.\xdc\x96"); } +test { try toUnicodePass("xn--84-s850a.xn--59h6326e", "84\xf0\x9d\x88\xbb.\xf0\x90\x8b\xb5\xe2\x9b\xa7"); } +test { try toUnicodePass("84\xf0\x9d\x88\xbb.\xf0\x90\x8b\xb5\xe2\x9b\xa7", "84\xf0\x9d\x88\xbb.\xf0\x90\x8b\xb5\xe2\x9b\xa7"); } +test { try toUnicodePass("\xe2\x89\xae\xf0\x9d\x9f\x95\xef\xbc\x8e\xe8\xac\x96\xc3\x9f\xe2\x89\xaf", "\xe2\x89\xae7.\xe8\xac\x96\xc3\x9f\xe2\x89\xaf"); } +test { try toUnicodePass("<\xcc\xb8\xf0\x9d\x9f\x95\xef\xbc\x8e\xe8\xac\x96\xc3\x9f>\xcc\xb8", "\xe2\x89\xae7.\xe8\xac\x96\xc3\x9f\xe2\x89\xaf"); } +test { try toUnicodePass("\xe2\x89\xae7.\xe8\xac\x96\xc3\x9f\xe2\x89\xaf", "\xe2\x89\xae7.\xe8\xac\x96\xc3\x9f\xe2\x89\xaf"); } +test { try toUnicodePass("<\xcc\xb87.\xe8\xac\x96\xc3\x9f>\xcc\xb8", "\xe2\x89\xae7.\xe8\xac\x96\xc3\x9f\xe2\x89\xaf"); } +test { try toUnicodePass("<\xcc\xb87.\xe8\xac\x96SS>\xcc\xb8", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("\xe2\x89\xae7.\xe8\xac\x96SS\xe2\x89\xaf", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("<\xcc\xb87.\xe8\xac\x96ss>\xcc\xb8", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("<\xcc\xb87.\xe8\xac\x96Ss>\xcc\xb8", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("\xe2\x89\xae7.\xe8\xac\x96Ss\xe2\x89\xaf", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("xn--7-mgo.xn--ss-xjvv174c", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("xn--7-mgo.xn--zca892oly5e", "\xe2\x89\xae7.\xe8\xac\x96\xc3\x9f\xe2\x89\xaf"); } +test { try toUnicodePass("<\xcc\xb8\xf0\x9d\x9f\x95\xef\xbc\x8e\xe8\xac\x96SS>\xcc\xb8", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("\xe2\x89\xae\xf0\x9d\x9f\x95\xef\xbc\x8e\xe8\xac\x96SS\xe2\x89\xaf", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("\xe2\x89\xae\xf0\x9d\x9f\x95\xef\xbc\x8e\xe8\xac\x96ss\xe2\x89\xaf", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("<\xcc\xb8\xf0\x9d\x9f\x95\xef\xbc\x8e\xe8\xac\x96ss>\xcc\xb8", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("<\xcc\xb8\xf0\x9d\x9f\x95\xef\xbc\x8e\xe8\xac\x96Ss>\xcc\xb8", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("\xe2\x89\xae\xf0\x9d\x9f\x95\xef\xbc\x8e\xe8\xac\x96Ss\xe2\x89\xaf", "\xe2\x89\xae7.\xe8\xac\x96ss\xe2\x89\xaf"); } +test { try toUnicodePass("xn--ss-bh7o", "ss\xf0\x91\x93\x83"); } +test { try toUnicodePass("ss\xf0\x91\x93\x83", "ss\xf0\x91\x93\x83"); } +test { try toUnicodePass("SS\xf0\x91\x93\x83", "ss\xf0\x91\x93\x83"); } +test { try toUnicodePass("Ss\xf0\x91\x93\x83", "ss\xf0\x91\x93\x83"); } +test { try toUnicodePass("xn--qekw60d.xn--gd9a", "\xe3\x83\xb6\xe4\x92\xa9.\xea\xa1\xaa"); } +test { try toUnicodePass("\xe3\x83\xb6\xe4\x92\xa9.\xea\xa1\xaa", "\xe3\x83\xb6\xe4\x92\xa9.\xea\xa1\xaa"); } +test { try toUnicodePass("xn--8c1a.xn--2ib8jn539l", "\xe8\x88\x9b.\xd9\xbd\xf0\x9e\xa4\xb4\xda\xbb"); } +test { try toUnicodePass("\xe8\x88\x9b.\xd9\xbd\xf0\x9e\xa4\xb4\xda\xbb", "\xe8\x88\x9b.\xd9\xbd\xf0\x9e\xa4\xb4\xda\xbb"); } +test { try toUnicodePass("\xe8\x88\x9b.\xd9\xbd\xf0\x9e\xa4\x92\xda\xbb", "\xe8\x88\x9b.\xd9\xbd\xf0\x9e\xa4\xb4\xda\xbb"); } +test { try toUnicodePass("xn--hcb32bni", "\xda\xbd\xd9\xa3\xd6\x96"); } +test { try toUnicodePass("\xda\xbd\xd9\xa3\xd6\x96", "\xda\xbd\xd9\xa3\xd6\x96"); } +test { try toUnicodePass("xn--8gb2338k.xn--lhb0154f", "\xd8\xbd\xf0\x91\x88\xbe.\xd9\x89\xea\xa4\xab"); } +test { try toUnicodePass("\xd8\xbd\xf0\x91\x88\xbe.\xd9\x89\xea\xa4\xab", "\xd8\xbd\xf0\x91\x88\xbe.\xd9\x89\xea\xa4\xab"); } +test { try toUnicodePass("\xe1\x83\x81\xe1\x82\xb16\xcc\x98\xe3\x80\x82\xc3\x9f\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.\xc3\x9f\xe1\xac\x83"); } +test { try toUnicodePass("\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98\xe3\x80\x82\xc3\x9f\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.\xc3\x9f\xe1\xac\x83"); } +test { try toUnicodePass("\xe1\x83\x81\xe1\x82\xb16\xcc\x98\xe3\x80\x82SS\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.ss\xe1\xac\x83"); } +test { try toUnicodePass("\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98\xe3\x80\x82ss\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.ss\xe1\xac\x83"); } +test { try toUnicodePass("\xe1\x83\x81\xe2\xb4\x916\xcc\x98\xe3\x80\x82Ss\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.ss\xe1\xac\x83"); } +test { try toUnicodePass("xn--6-8cb7433a2ba.xn--ss-2vq", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.ss\xe1\xac\x83"); } +test { try toUnicodePass("\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.ss\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.ss\xe1\xac\x83"); } +test { try toUnicodePass("\xe1\x83\x81\xe1\x82\xb16\xcc\x98.SS\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.ss\xe1\xac\x83"); } +test { try toUnicodePass("\xe1\x83\x81\xe2\xb4\x916\xcc\x98.Ss\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.ss\xe1\xac\x83"); } +test { try toUnicodePass("xn--6-8cb7433a2ba.xn--zca894k", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.\xc3\x9f\xe1\xac\x83"); } +test { try toUnicodePass("\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.\xc3\x9f\xe1\xac\x83", "\xe2\xb4\xa1\xe2\xb4\x916\xcc\x98.\xc3\x9f\xe1\xac\x83"); } +test { try toUnicodePass("xn--7zv.", "\xe6\xa2\x89."); } +test { try toUnicodePass("\xe6\xa2\x89.", "\xe6\xa2\x89."); } +test { try toUnicodePass("xn--iwb.ss", "\xe0\xa1\x93.ss"); } +test { try toUnicodePass("\xe0\xa1\x93.ss", "\xe0\xa1\x93.ss"); } +test { try toUnicodePass("\xe0\xa1\x93.SS", "\xe0\xa1\x93.ss"); } +test { try toUnicodePass("xn--ix9c26l.xn--q0s", "\xf0\x90\xab\x9c\xf0\x91\x8c\xbc.\xe5\xa9\x80"); } +test { try toUnicodePass("\xf0\x90\xab\x9c\xf0\x91\x8c\xbc.\xe5\xa9\x80", "\xf0\x90\xab\x9c\xf0\x91\x8c\xbc.\xe5\xa9\x80"); } +test { try toUnicodePass("\xf0\x90\xab\x80\xef\xbc\x8e\xda\x89\xf0\x91\x8c\x80", "\xf0\x90\xab\x80.\xda\x89\xf0\x91\x8c\x80"); } +test { try toUnicodePass("\xf0\x90\xab\x80.\xda\x89\xf0\x91\x8c\x80", "\xf0\x90\xab\x80.\xda\x89\xf0\x91\x8c\x80"); } +test { try toUnicodePass("xn--pw9c.xn--fjb8658k", "\xf0\x90\xab\x80.\xda\x89\xf0\x91\x8c\x80"); } +test { try toUnicodePass("xn--r97c.", "\xf0\x90\x8b\xb7."); } +test { try toUnicodePass("\xf0\x90\x8b\xb7.", "\xf0\x90\x8b\xb7."); } diff --git a/zigmod.yml b/zigmod.yml index 74d8e68519d4b00d5aa3be2e83fa800ff0c1da5c..0bff3ed0323f2e7d9c07c80550be3b8e74a60cd5 100644 --- a/zigmod.yml +++ b/zigmod.yml @@ -4,3 +4,7 @@ main: idna.zig license: MIT description: "UTS #46" dependencies: + - src: git https://github.com/nektro/zig-extras + - src: git https://github.com/nektro/zig-unicode-ucd +root_dependencies: + - src: git https://github.com/nektro/zig-expect -- 2.54.0