为什么N'Ko默认为小数点后的3位数? - Windows中的每个其他文化都使用2。 [英] Why does N'Ko default to 3 digits after the decimal? — every single other culture in Windows uses 2.

查看:97
本文介绍了为什么N'Ko默认为小数点后的3位数? - Windows中的每个其他文化都使用2。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到任何相关信息,我很好奇为什么会这样。

我不是N'Ko语言的发言人,也不是N'Ko字母的用户(也被其他几种语言使用)。我没有任何问题需要解决小数位数。我只是好奇为什么微软选择给这个
文化3个十进制数字,而每隔一个使用2个。

I am not a speaker of the N'Ko language, nor a user of the N'Ko alphabet (which is also used by several other languages). I don't have any issue I need to solve around the number of decimal places. I am just curious why Microsoft has chosen to give this culture 3 decimal digits, whereas every other one uses 2.

注意默认< N'Ko的em> currency 设置使用2位小数,因此它可能与几内亚法郎无关,后者使用1/100子单位(厘米)。

Note the default currency setting for N'Ko uses 2 decimal places, so it is presumably unrelated to the Guinea Franc, which uses 1/100 subunits (centime).

我通过CultureInfo.GetCultures(CultureTypes.AllCultures)检查了C#中的所有Windows文化,只发现了N'ko (代码:
nqo nqo-GN )使用3位小数,而所有其他位数使用2.

I checked all Windows cultures in C# via CultureInfo.GetCultures(CultureTypes.AllCultures) and found only N'ko (codes: nqo and nqo-GN) uses 3 decimal places, whereas all others use 2.

示例:

example:

<跨度>的CultureInfo <跨度>。( <跨度>" NQO" <跨度>) NumberFormat NumberDecimalDigits
== 3;
//仅适用于" NGO"和"ngo-GN"


new CultureInfo("nqo").NumberFormat.NumberDecimalDigits == 3; // true only for "ngo" and "ngo-GN"

我很想解释为什么会这样。

I would love an explanation of why this is.

我搜索了网页,挖掘了有关N'Ko的文章,甚至在StackExchange上提供了赏金,但没有找到答案。我很想得到一位可能认识的人或微软工程师的回答。

I have searched the web, dug through articles about N'Ko, and even offered a bounty on StackExchange, but found no inkling of an answer. I'd love an answer from someone who might know or from a Microsoft engineer.

我在使用自己的TimeSpanParser工作时遇到了这个问题。希望国际化。

I came across this issue while working on my own TimeSpanParser, which I wish to internationalize.

感谢您的回答。

Thanks for your answer.

推荐答案

您好Qubei,

Hi Qubei,

感谢您在此发帖。

NumberFormatInfo.NumberDecimalDigits属性返回要在数值中使用的小数位数。 InvariantInfo的默认值为2.根据我的搜索,预定义CultureInfo中的名称和标识符不接受nqo。

The NumberFormatInfo.NumberDecimalDigits Property return the number of decimal places to use in numeric values. The default for InvariantInfo is 2. Based on my search, the nqo is not accepted for names and identifiers in predefined CultureInfo.

对于名称和标识符的预定义CultureInfo,您可以参考链接如下。

For the predefined CultureInfo of names and identifiers, you could refer to the link below.

http ://www1..cs.columbia.edu/~lok/csharp/refdocs/System.Globalization/types/CultureInfo.html

我也在STackOverFlow中看到你的主题。我检查了Ben Croughs所说的Region seetings中小数点后的位数。这是一个新想法。我想这可能就是原因。但是当我尝试在Region中更改2到3时。它不起作用。

I also see your thread in STackOverFlow. I check the No. of digits after decimal in Region seetings what Ben Croughs said. It is a new idea. I think it may be why. But when I try to change 2 to 3 in Region. It does not work.

您可以使用C#格式F或N更改nqo数字3到2.

You could change the nqo digits 3 to 2 use the C# format F or N.

请尝试下面的代码。

  // Gets a NumberFormatInfo associated with the en-US culture.
            NumberFormatInfo nfi = new CultureInfo("nqo-GN", false).NumberFormat;

            // Displays a negative value with the default number of decimal digits (2).
            Int64 myInt = 1234;
            Console.WriteLine(myInt.ToString("F2", nfi));

            // Displays the same value with four decimal digits.
            nfi.NumberDecimalDigits = 2;
            Console.WriteLine(myInt.ToString("N", nfi));

最好的问候,

Wendy

注意:此响应包含对第三方万维网站点的引用。 Microsoft提供此信息是为了方便您。


Microsoft不控制这些网站,也没有测试在这些网站上找到的任何软件或信息;因此,Microsoft不能就其中发现的任何软件或信息的质量,安全性或适用性做出任何陈述。

使用互联网上的任何软件都存在固有的危险,微软提醒您在从Internet检索任何软件之前确保您完全了解风险。

Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you.
Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


这篇关于为什么N'Ko默认为小数点后的3位数? - Windows中的每个其他文化都使用2。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆