Created on 2026-03-21.00:00:00 last changed 6 days ago
Proposed resolution:
This wording is relative to N5032.
Modify [print.fun] as indicated:
void vprint_nonunicode_buffered(FILE* stream, string_view fmt, format_args args);-14- Effects: Equivalent to:
string out = vformat(fmt, args); vprint_nonunicode(stream, "{}", make_format_args(out));
[ Croydon 2026-03-24; move to Immediate ]
The Effects element of `vprint_nonunicode_buffered(FILE* stream, string_view fmt, format_args args)` in [print.fun] p14 is specified as:
string out = vformat(fmt, args);
vprint_nonunicode("{}", make_format_args(out));
That call selects the two-argument overload `vprint_nonunicode(string_view, format_args)` ([print.fun] p13), whose Effects element delegates to `vprint_nonunicode(stdout, fmt, args)`. The caller-supplied stream is discarded and the output destination becomes `stdout`.
The parallel function `vprint_unicode_buffered` ([print.fun] p8) correctly passes `stream`:
string out = vformat(fmt, args);
vprint_unicode(stream, "{}", make_format_args(out));
This is user-visible: `print(FILE* stream, ...)` ([print.fun] p2) calls `vprint_nonunicode_buffered(stream, ...)` on the non-UTF-8 buffered path, so the current wording routes output to the wrong stream.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-03-24 17:29:18 | admin | set | messages: + msg16061 |
| 2026-03-24 17:29:18 | admin | set | status: new -> immediate |
| 2026-03-21 16:56:12 | admin | set | messages: + msg16040 |
| 2026-03-21 00:00:00 | admin | create | |