How to enumerate the LOCALIZED alphabet in C#?

后端 未结 3 1712
忘了有多久
忘了有多久 2020-12-07 01:17

First of all, this is not a duplicate of: Quickest way to enumerate the alphabet

Because I need to get all the characters of the alphabet OF AN ARBITRARY (variable)

3条回答
  •  有刺的猬
    2020-12-07 01:59

    I don't think that the .Net framework provides what you want. First of all, not all languages have alphabets in the western sense of the word. Second, even if you limit your coverage to those languages that have alphabets, iterating through the contents of a code page won't work because many code pages cover several languages (eg, CP 1252 covers the main western european languages). Third, some of the more recently supported languages on Windows don't have code pages. I don't think there is a solution outside of having a priori knowledge of the alphabets of the languages you're interested in.

    Perhaps if you explained what you are trying to achieve, a better solution could be suggested.

提交回复
热议问题