diff options
Diffstat (limited to 'mcs/class/corlib/System/FloatingPointFormatter.cs')
-rw-r--r-- | mcs/class/corlib/System/FloatingPointFormatter.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mcs/class/corlib/System/FloatingPointFormatter.cs b/mcs/class/corlib/System/FloatingPointFormatter.cs index a436b03a965..f9d2011bc82 100644 --- a/mcs/class/corlib/System/FloatingPointFormatter.cs +++ b/mcs/class/corlib/System/FloatingPointFormatter.cs @@ -592,7 +592,7 @@ namespace System { return "0"; } if (result.Length > 0) { - result = "-" + result; + result = nfi.NegativeSign + result; } return result; } @@ -628,6 +628,7 @@ namespace System { public int NumberOfColons; public bool Groupping; public bool Percent; + public bool Permille; public int DotPos; public int ExpPos; public int FirstFormatPos; @@ -676,6 +677,9 @@ namespace System { case '%': f.Percent = true; break; + case '\u2030': + f.Permille = true; + break; case 'e': case 'E': f.DecimalLength = count; @@ -705,13 +709,17 @@ namespace System { if (f.FirstFormatPos < 0) { return format; } - if (((f.Percent) || (f.NumberOfColons > 0)) && (f.ExpPos < 0)) { + if (((f.Percent) || (f.Permille) || (f.NumberOfColons > 0)) && (f.ExpPos < 0)) { int len = f.DecimalLength; int exp = 0; if (f.Percent) { len += 2; exp += 2; } + else if (f.Permille) { + len += 3; + exp += 3; + } if (f.NumberOfColons > 0) { len -= (3 * f.NumberOfColons); exp -= 3 * f.NumberOfColons; |