How can I convert Cyrillic string into English in c#

前端 未结 10 1037
醉酒成梦
醉酒成梦 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:40

    You are searching for a way of translitterating russian words written in cirillic (in some encodings, e.g. even a Latin encoding, since iso 8859-5 aka Latin-5 is for cyrillic) into latin alphabet (with accents)?

    I don't know if .NET has something to transliterate, but I dare say it (as many other good frameworks) hasn't. This wikipedian link could give you some ideas to implement translitteration, but it is not the only way and remember tha cyrillic writing systems is not used by russian only and the way you apply translitteration may vary on the language that use the writing system. E.g. see the same for bulgarian. May this link (always from wp) can be also interesting if you want to program the translitterator by yourself.

提交回复
热议问题