Skip to content

US228 20.20.02.2 [format.string.std] p7,9 Specify units of width and precision P1868 LWG 3290 #225

@wg21bot

Description

@wg21bot

Units of width and precision are not specified which causes an ambiguity for strings in variable-length encodings.

Proposed change:
Width and precision for strings should be computed based on fixed operating system dependent encodings. If the operating system is capable of displaying Unicode text in a terminal both ordinary and wide encodings are Unicode encodings such as UTF-8 and UTF-16, respectively. [ Note: this is the case for Windows-based and many POSIX-based operating systems. -- end note ] Otherwise encodings are implementation-defined. For the given encoding, display width of a string is the number of column positions needed to display the string in a terminal [ Note: This is similar to the semantics of the POSIX wcswidth function with a fixed encoding. —]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions