[Enhancement] Support printf formatting of uint16_t[] FONTCHARACTER strings #3
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It could be printed by ignoring the high byte of each 16-bit character.
If the user specifies %ls instead of %s, if I'm understanding correctly that will set
opt.size = sizeof(long)
. Then src/stdio/printf/format_usual.c, printf_format_s() can accessopt->size
. Changes would include a new length calculation and a new__printf_out
for loop.Right,
%ls
enables printing wide characters. I'm quite unsure about how to go with these. On the one hand they feel great to supportFONTCHARACTER
, on the other hand that wouldn't be compatible with usual PC/Linux behavior.I'm wondering whether we can define a locale where normal chars are UTF-8 and wide chars are
FONTCHARACTER
while remaining predictably compatible with C99?The other option would be a
printf()
extension like we have for%D
.Regardless of the particular implementation, I am definitely in favor of supporting such a format.
[Enhancement] Support printf formatting of uint16_t[] FONTCHARACTER strings via %lsto [Enhancement] Support printf formatting of uint16_t[] FONTCHARACTER strings