runtime: Help needed for wrong result of System.Globalization.IdnMapping.GetAscii()

Hi all,

When using System.Globalization.IdnMapping.GetAscii I got “wrong” result for some cases:

var mapping = new System.Globalization.IdnMapping();
mapping.GetAscii("faß.de");
// expect "xn--fa-hia.de"
// but got "fass.de"

This is about the Deviation Characters between IDNA2003 and IDNA2008 According to Documentation,

  • When run on Windows 8, it supports the 2008 version of the IDNA standard outlined by RFC 5891: Internationalized Domain Names in Applications (IDNA): Protocol.
  • When run on earlier versions of the Windows operating system, it supports the 2003 version of the standard outlined by RFC 3490: Internationalizing Domain Names in Applications (IDNA).

My test environment is Windows 10 and .Net Framework 4.8, so I expect result aligned with IDNA2008. However, test shows that the result is aligned with IDNA2003.

Is this a documentation mistake, or I’m using the library in a wrong way?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

closing per #37281

@safern I marked this for 5.0 as you are in the process to enable the ASCII transitional when using ICU.