Item8463: TABLE sorting doesn't recognize numbers with commas
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
In the US, numbers in the thousands can be formatted with commas. TABLE does not recognize these as numbers when sorting.
In the example below,
|ct|12|0|0.00%|8|66.67%|12|
should sort at the top when the table is sorted on column #2.
Country |
Total |
Total RSS |
% RSS |
!SpaceID |
% SpaceID |
Non-Rss |
at |
1,128 |
0 |
0.00% |
976 |
86.52% |
1,128 |
aa |
10,296 |
7,316 |
71.06% |
800 |
7.77% |
2,980 |
cf |
11,040 |
9,280 |
84.06% |
220 |
1.99% |
1,760 |
au |
13,660 |
9,088 |
66.53% |
800 |
5.86% |
4,572 |
cd |
17,400 |
4,992 |
28.69% |
7,004 |
40.25% |
12,408 |
ar |
26,476 |
18,056 |
68.20% |
1,148 |
4.34% |
8,420 |
chit |
32 |
0 |
0.00% |
24 |
75.00% |
32 |
chfr |
80 |
0 |
0.00% |
36 |
45.00% |
80 |
br |
87,968 |
76,064 |
86.47% |
2,984 |
3.39% |
11,904 |
ca |
110,808 |
94,960 |
85.70% |
2,488 |
2.25% |
15,848 |
ch |
256 |
0 |
0.00% |
152 |
59.38% |
256 |
--
VickiBrown - 03 Feb 2010
NO! That will break things for most non-English speaking countries where we use the comma as decimal separator (radix point).
10,296 comes BEFORE 13,66. 110,808 comes before 256 in a comma context.
The table above sorts correctly in a comma radix context. If we fixed the sorting as suggested, sorting would break for us non-English.
The code is done correctly today to it works with numbers with a radix in both systems. This means that you cannot use a 1000 separator but it is better to live with this than breaking standard sorting for the rest of us.
The only way to fix this would be to have a setting that identifies the comma/dot scheme. In MS Excel you also define the decimal symbol as part of regional settings.
To put things in perspective these are examples of countries using comma: Albania, Andorra, Argentina, Armenia, Austria, Azerbaijan, Belarus, Belgium, Bolivia, Bosnia and Herzegovina, Brazil, Bulgaria, Cameroon, Canada (French-speaking), Costa Rica, Croatia, Chile, Colombia, Cuba, Cyprus, Czech Republic, Denmark, Dominican Republic, Ecuador, El Salvador, Estonia, Faroes, Finland, France, Germany, Greece, Greenland, Honduras, Hungary, Indonesia, Iceland, Italy, Kazakhstan, Latvia, Lithuania, Luxembourg, Macau, Macedonia, Moldova, Netherlands, Norway, Nicaragua, Panama, Peru, Paraguay, Poland, Portugal, Romania, Russia, Serbia, Slovakia, South Africa, Slovenia, Spain, Sweden, Turkey, Ukraine, Uruguay, Venezuela, Vietnam.
I am going to non-action this.
--
KennethLavrsen - 05 Feb 2010