Skip to content

UTF8Formatter is inconsistent with and more limited than the utf16 formatting support #67962

@tannergooding

Description

@tannergooding

As raised in #67959 (comment), the Utf8Formatter appears to be first and foremost inconsistent with T.ToString(string format) for the formats it does support.

For example, it currently throws if any precision specifier is given for G where-as int.ToString("G99") is completely valid.

It appears as though integers are missing support for C, E, F, and P.

Floating-point more broadly (meaning including for utf16 formatting) doesn't support D either, but reasonably could (its basically just an alternative to F0).

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions