Skip to content

<format>: Wide and multibyte versions different behavior for char arg. #2320

@jovibor

Description

@jovibor
#include <iostream>
#include <format>

int main()
{
	char ch = -1;
	std::cout << std::format("cout: {:d}\r\n", ch);
	std::wcout << std::format(L"wcout: {:d}\r\n", ch);
}

The output:
image

Shouldn't the result be the same?
VS 16.11.5
Unfortunately I can't test in VS 17 at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!formatC++20/23 format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions