Open tannergooding opened 2 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @dotnet/area-system-runtime See info in area-owners.md if you want to be subscribed.
Author: | tannergooding |
---|---|
Assignees: | - |
Labels: | `area-System.Runtime`, `untriaged` |
Milestone: | - |
As raised in https://github.com/dotnet/runtime/pull/67959#discussion_r849654971, the
Utf8Formatter
appears to be first and foremost inconsistent withT.ToString(string format)
for the formats it does support.For example, it currently throws if any precision specifier is given for
G
where-asint.ToString("G99")
is completely valid.It appears as though integers are missing support for
C
,E
,F
, andP
.Floating-point
more broadly (meaning including forutf16
formatting) doesn't supportD
either, but reasonably could (its basically just an alternative toF0
).It looks like
floating-point
just forwards down to the utf16 formatter and so it appears to support the same set. This is, however, less efficient and should likely be looked at since we actually have a correct interim UTF8 buffer for the digits that are built up.