public Unicode_11_0_IdnaTest(string line, int lineNumber)
        {
            var split = line.Split(';');

            Source        = EscapedToLiteralString(split[0], lineNumber);
            UnicodeResult = new ConformanceIdnaUnicodeTestResult(EscapedToLiteralString(split[1], lineNumber), Source);
            ASCIIResult   = new ConformanceIdnaTestResult(EscapedToLiteralString(split[3], lineNumber), UnicodeResult.Value);
            LineNumber    = lineNumber;
        }
        public Unicode_Win7_IdnaTest(string line, int lineNumber)
        {
            var split = line.Split(';');

            Type          = ConvertStringToType(split[0].Trim());
            Source        = EscapedToLiteralString(split[1], lineNumber);
            UnicodeResult = new ConformanceIdnaUnicodeTestResult(EscapedToLiteralString(split[2], lineNumber), Source);
            ASCIIResult   = new ConformanceIdnaTestResult(EscapedToLiteralString(split[3], lineNumber), UnicodeResult.Value);
            LineNumber    = lineNumber;
        }
Beispiel #3
0
        public Unicode_9_0_IdnaTest(string line, int lineNumber)
        {
            string[] split = line.Split(';');

            Type   = ConvertStringToType(split[0].Trim());
            Source = EscapedToLiteralString(split[1], lineNumber);
            bool validDomainName = (split.Length != 5 || split[4].Trim() != "NV8");

            UnicodeResult = new ConformanceIdnaUnicodeTestResult(EscapedToLiteralString(split[2], lineNumber), Source, validDomainName);
            ASCIIResult   = new ConformanceIdnaTestResult(EscapedToLiteralString(split[3], lineNumber), UnicodeResult.Value);
            LineNumber    = lineNumber;
        }
        public Unicode_11_0_IdnaTest(string line, int lineNumber)
        {
            var split = line.Split(';');

            Type = IdnType.Nontransitional;

            Source = EscapedToLiteralString(split[0], lineNumber);

            UnicodeResult = new ConformanceIdnaUnicodeTestResult(EscapedToLiteralString(split[1], lineNumber), Source, EscapedToLiteralString(split[2], lineNumber), string.Empty);
            ASCIIResult   = new ConformanceIdnaTestResult(EscapedToLiteralString(split[3], lineNumber), UnicodeResult.Value, EscapedToLiteralString(split[4], lineNumber), UnicodeResult.StatusValue);

            LineNumber = lineNumber;
        }
Beispiel #5
0
        public Unicode_9_0_IdnaTest(string line, int lineNumber)
        {
            string[] split = line.Split(';');

            Type   = ConvertStringToType(split[0].Trim());
            Source = EscapedToLiteralString(split[1], lineNumber);
            bool validDomainName = (split.Length != 5 || split[4].Trim() != "NV8");

            // Server 2019 uses ICU 61.0 whose IDNA does not support the following cases. Ignore these entries there.
            if (PlatformDetection.IsWindowsServer2019 && Source.EndsWith("\ud802\udf8b\u3002\udb40\udd0a", StringComparison.Ordinal))
            {
                Source = "";
            }

            UnicodeResult = new ConformanceIdnaUnicodeTestResult(EscapedToLiteralString(split[2], lineNumber), Source, validDomainName);
            ASCIIResult   = new ConformanceIdnaTestResult(EscapedToLiteralString(split[3], lineNumber), UnicodeResult.Value);
            LineNumber    = lineNumber;
        }
Beispiel #6
0
        public Unicode_13_0_IdnaTest(string line, int lineNumber)
        {
            var split = line.Split(';');

            Type = PlatformDetection.IsNlsGlobalization ? IdnType.Transitional : IdnType.Nontransitional;

            Source = EscapedToLiteralString(split[0], lineNumber);

            UnicodeResult = new ConformanceIdnaUnicodeTestResult(EscapedToLiteralString(split[1], lineNumber), Source, EscapedToLiteralString(split[2], lineNumber), string.Empty);
            ASCIIResult   = new ConformanceIdnaTestResult(EscapedToLiteralString(split[3], lineNumber), UnicodeResult.Value, EscapedToLiteralString(split[4], lineNumber), UnicodeResult.StatusValue);

            // NLS uses transitional IDN processing.
            if (Type == IdnType.Transitional)
            {
                ASCIIResult = new ConformanceIdnaTestResult(EscapedToLiteralString(split[5], lineNumber), ASCIIResult.Value, EscapedToLiteralString(split[6], lineNumber), ASCIIResult.StatusValue);
            }

            LineNumber = lineNumber;
        }