Use locale when quoting.

* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
quote rather than implementing quoting here.
This commit is contained in:
Joel E. Denny
2009-08-21 20:09:54 -04:00
parent b0778bdd0c
commit e6c849d82a
2 changed files with 8 additions and 5 deletions

View File

@@ -1,3 +1,9 @@
2009-08-21 Joel E. Denny <jdenny@clemson.edu>
Use locale when quoting.
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
quote rather than implementing quoting here.
2009-08-20 Eric Blake <ebb9@byu.net>
Make previous patch more robust.

View File

@@ -617,12 +617,9 @@ splice (\\[ \f\t\v]*\n)*
}
\\(.|\n) {
char const *p = yytext + 1;
char quoted_ws[] = "` '";
/* Quote only if escaping won't make the character visible. */
if (isspace (*p) && isprint (*p))
{
quoted_ws[1] = *p;
p = quoted_ws;
}
p = quote (p);
else
p = quotearg_style_mem (escape_quoting_style, p, 1);
complain_at (*loc, _("invalid character after \\-escape: %s"), p);