From 6cb2ac46f482daec74fc136675ae4007437bc10d Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 13 Jan 2016 11:05:11 -0600 Subject: IdnMapping GetUnicode conformance tests fail The IdnaConformanceTests fail on Unix because \u00DF, \u200C and \u200D characters are not being handled as specified in the http://www.unicode.org/Public/idna/6.0.0/IdnaTest.txt file. The fix is to use UIDNA_NONTRANSITIONAL_TO_UNICODE and UIDNA_CHECK_CONTEXTJ options when calling uidna_openUTS46. Partial fix for https://github.com/dotnet/corefx/issues/3406. --- src/corefx/System.Globalization.Native/idna.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corefx/System.Globalization.Native/idna.cpp b/src/corefx/System.Globalization.Native/idna.cpp index 024c02a6c8..6101296f42 100644 --- a/src/corefx/System.Globalization.Native/idna.cpp +++ b/src/corefx/System.Globalization.Native/idna.cpp @@ -12,7 +12,8 @@ const uint32_t UseStd3AsciiRules = 0x2; uint32_t GetOptions(uint32_t flags) { - uint32_t options = UIDNA_DEFAULT; + // Using Nontransitional to Unicode and Check ContextJ to match the current behavior of .NET on Windows + uint32_t options = UIDNA_NONTRANSITIONAL_TO_UNICODE | UIDNA_CHECK_CONTEXTJ; if ((flags & AllowUnassigned) == AllowUnassigned) { -- cgit v1.2.3