diff options
author | Daiki Ueno <ueno@gnu.org> | 2014-05-12 18:14:54 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2014-05-12 18:14:54 +0900 |
commit | cb9da089c9c5c2516d50925890cfafdf23c80b36 (patch) | |
tree | 659793587772148de256dd689f014cd6bc0a0e26 | |
parent | 01c736b2bc7ec03f4d690ad699b7abb63c83cd97 (diff) | |
download | external_gettext-cb9da089c9c5c2516d50925890cfafdf23c80b36.zip external_gettext-cb9da089c9c5c2516d50925890cfafdf23c80b36.tar.gz external_gettext-cb9da089c9c5c2516d50925890cfafdf23c80b36.tar.bz2 |
msgfilter: Fix quote handling of doubled grave charaters
* filter-quote.c (convert_ascii_quote_to_unicode): Fix handling of
doubled grave characters.
-rw-r--r-- | gettext-tools/src/ChangeLog | 6 | ||||
-rw-r--r-- | gettext-tools/src/filter-quote.c | 1 | ||||
-rw-r--r-- | gettext-tools/tests/ChangeLog | 4 | ||||
-rwxr-xr-x | gettext-tools/tests/msgfilter-quote-1 | 9 |
4 files changed, 20 insertions, 0 deletions
diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 6f662a4..1937a00 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,5 +1,11 @@ 2014-05-12 Daiki Ueno <ueno@gnu.org> + msgfilter: Fix quote handling of doubled grave charaters + * filter-quote.c (convert_ascii_quote_to_unicode): Fix handling of + doubled grave characters. + +2014-05-12 Daiki Ueno <ueno@gnu.org> + * msgfmt.c (add_languages): New function split from get_languages. (get_languages): Use add_languages instead of manually parsing LINGUAS envvar with strtok_r. diff --git a/gettext-tools/src/filter-quote.c b/gettext-tools/src/filter-quote.c index d69bd61..4cddf09 100644 --- a/gettext-tools/src/filter-quote.c +++ b/gettext-tools/src/filter-quote.c @@ -125,6 +125,7 @@ convert_ascii_quote_to_unicode (const char *input, size_t input_len, if (*start == '`') { memcpy (r, start, p - start); + r += p - start; start = p; } } diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index dd47ea6..ad6362d 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,7 @@ +2014-05-12 Daiki Ueno <ueno@gnu.org> + + * msgfilter-quote-1: Test doubled grave characters. + 2014-05-10 Guido Flohr <guido@imperia.net> msgattrib: Add --empty option to clear msgstr diff --git a/gettext-tools/tests/msgfilter-quote-1 b/gettext-tools/tests/msgfilter-quote-1 index fe33643..28b429a 100755 --- a/gettext-tools/tests/msgfilter-quote-1 +++ b/gettext-tools/tests/msgfilter-quote-1 @@ -70,6 +70,9 @@ msgstr "`single quoted with grave'" msgid "single quoted with grave, empty `'" msgstr "single quoted with grave, empty `'" + +msgid "``double grave'" +msgstr "``double grave'" EOF : ${MSGFILTER=msgfilter} @@ -142,6 +145,9 @@ msgstr "‘single quoted with grave’" msgid "single quoted with grave, empty `'" msgstr "single quoted with grave, empty ‘’" + +msgid "``double grave'" +msgstr "`‘double grave’" EOF : ${DIFF=diff} @@ -216,6 +222,9 @@ msgstr "‘[1msingle quoted with grave[0m’" msgid "single quoted with grave, empty `'" msgstr "single quoted with grave, empty ‘[1m[0m’" + +msgid "``double grave'" +msgstr "`‘[1mdouble grave[0m’" EOF ${DIFF} mfi-boldquot.ok mfi-boldquot.out || exit 1 |