]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: In language Tcl, support \x, \u, \U escapes as specified in Tcl 8.6.
authorBruno Haible <bruno@clisp.org>
Tue, 14 Mar 2023 11:59:22 +0000 (12:59 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 14 Mar 2023 12:10:10 +0000 (13:10 +0100)
commit0458d3efda00e9fd940675a8f64deda1ee5e688a
treee0fd4f2816af039f747a3f870be3eab210a805fa
parentfa2fbdbcbf359dfb024467d698f2d8732527f97c
xgettext: In language Tcl, support \x, \u, \U escapes as specified in Tcl 8.6.

* gettext-tools/src/x-tcl.c: Update comments.
(phase1_pushback): Increase size to 5.
(do_getc_escaped): For \x, parse only up to 2 hexadecimal characters.
Handle '\U'.
(do_getc_escaped_low_surrogate): New function.
(accumulate_word): After reading a high surrogate, see if it is followed by a
low surrogate.
* gettext-tools/tests/xgettext-tcl-4: Change expected outcome for \x. Add test
cases for \u with surrogates and for \U.
* gettext-tools/tests/xgettext-tcl-5: Add more test cases.
* NEWS: Mention the change.
NEWS
gettext-tools/src/x-tcl.c
gettext-tools/tests/xgettext-tcl-4
gettext-tools/tests/xgettext-tcl-5