|
From: | Pádraig Brady |
Subject: | Re: [PATCH] printf: with \U syntax, support all valid unicode points |
Date: | Thu, 27 Oct 2022 22:06:09 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Thunderbird/98.0 |
On 27/10/2022 21:46, Bernhard Voelker wrote:
On 10/27/22 16:41, Pádraig Brady wrote:Previously this was restricted to the C standard subset which restricted most values <= 0x9F, as that simplifies the C lexer. However printf(1) doesn't need this restriction. Note also the bash builtin printf already supports all values <= 0x9F.Nice one. BTW: do we also want to support the new modifier that bash has since version 5.2? r. The `printf' builtin has a new format specifier: %Q. This acts like %q but applies any specified precision to the original unquoted argument, then quotes and outputs the result.
That does sound useful. However we yet don't support qualifiers on %q which would need to come first. $ printf '%.4q\n' 'sp ace' # builtin sp\ $ env printf '%.4q\n' 'sp ace' printf: %.4q: invalid conversion specification cheers, Pádraig
[Prev in Thread] | Current Thread | [Next in Thread] |