mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
printf %#H: tweak writing unreserved chars (re: 8477d2ce
)
src/cmd/ksh93/bltins/print.c: - If in UTF-8 locale, only bother to check for unreserved char if the character is ASCII (< 128), and write unreserved chars with a simple stakputc().
This commit is contained in:
parent
a116022625
commit
cadd1a81dc
1 changed files with 2 additions and 2 deletions
|
@ -516,8 +516,8 @@ static char *fmthtml(const char *string, int flags)
|
||||||
{
|
{
|
||||||
if(c < 0)
|
if(c < 0)
|
||||||
stakputs("%3F");
|
stakputs("%3F");
|
||||||
else if(c <= 255 && strchr(URI_RFC3986_UNRESERVED, c))
|
else if(c < 128 && strchr(URI_RFC3986_UNRESERVED, c))
|
||||||
stakwrite(op, cp-op);
|
stakputc(c);
|
||||||
else
|
else
|
||||||
while(c = *(unsigned char*)op++, op <= cp)
|
while(c = *(unsigned char*)op++, op <= cp)
|
||||||
sfprintf(stkstd, "%%%02X", c);
|
sfprintf(stkstd, "%%%02X", c);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue