Localization: How to map culture info to a script name or Unicode character range?

后端 未结 5 1434
温柔的废话
温柔的废话 2020-12-21 15:50

I need some information about localization. I am using .net 2.0 with C# 2.0 which takes care of most of the localization related issues. However, I need to manually draw the

5条回答
  •  一个人的身影
    2020-12-21 16:46

    Proto, wait! There's a much more accurate solution. It's an unmanaged on hance you may have to P/Invoke.

    GetLocaleInfoW(MAKELCID(wLangId, SORT_DEFAULT), LOCALE_FONTSIGNATURE, wcBuf, MAXWCBUF);
    

    This gives you a LOCALESIGNATURE stucture. The anwer is in the lsUsb field: Unicode subsets bitfield. Rats! the MS page for this structure is empty. But look it up in your MSDN copy. It's fully documented there: A whole set of flags that describe which scripts are spported. And yes, there's a flag for Tamil ;-)

    HTH.

    EDIT: Oops! Hadn't seen Shawne's answer. Wow! Answer from an in-house expert! ;-) Anyway, you may still be interested in a Pre-Vista compatible answer.

提交回复
热议问题