UnidecodeSharpCore
US-ASCII transliterations of Unicode text. It supports almost all unicode letters, including Chinese, Cyrillic, Umlauts and etc.
Install / Use
/learn @codeyu/UnidecodeSharpCoreREADME
UnidecodeSharpCore
UnidecodeSharpCore is .NET Core library, written in C#.
It fork from unidecodesharpfork. It reference from Gist.
It provides string or char extension method Unidecode() that returns ASCII transliterations of unicode text. It supports almost all unicode letters, including Chinese, Cyrillic, Umlauts and etc. For more details please look at Perl description
Generally, idea is:
("北京").Unidecode() == "Bei Jing "
Usage
[Fact]
public void PythonTest()
{
Assert.Equal("Hello, World!", "Hello, World!".Unidecode());
Assert.Equal("Ni Hao ", "你好".Unidecode());
Assert.Equal("Xian Zai Shi Fan Ti Zi ", "現在是繁體字".Unidecode());
Assert.Equal("'\"\r\n", "'\"\r\n".Unidecode());
Assert.Equal("CZSczs", "ČŽŠčžš".Unidecode());
Assert.Equal("a", "ア".Unidecode());
Assert.Equal("a", "α".Unidecode());
Assert.Equal("a", "а".Unidecode());
Assert.Equal("chateau", "ch\u00e2teau".Unidecode());
Assert.Equal("vinedos", "vi\u00f1edos".Unidecode());
}
