How can I convert Cyrillic string into English in c#

前端 未结 10 1002
醉酒成梦
醉酒成梦 2020-12-31 21:05

Is it posible to convert Cyrillic string to English(Latin) in c#? For example I need to convert \"Петролеум\" in \"Petroleum\". Plus I forgot to mention that if I have Cyril

10条回答
  •  天涯浪人
    2020-12-31 21:55

    If you're using Windows 7, you can take advantage of the new ELS (Extended Linguistic Services) API, which provides transliteration functionality for you. Have a look at the Windows 7 API Code Pack - it's a set of managed wrappers on top of many new API in Windows 7 (such as the new Taskbar). Look in the Samples folder for the Transliterator example, you'll find it's exactly what you're looking for:

提交回复
热议问题