From: Daiki Ueno Date: Mon, 12 May 2014 09:14:54 +0000 (+0900) Subject: msgfilter: Fix quote handling of doubled grave charaters X-Git-Tag: v0.19~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb9da089c9c5c2516d50925890cfafdf23c80b36;p=thirdparty%2Fgettext.git msgfilter: Fix quote handling of doubled grave charaters * filter-quote.c (convert_ascii_quote_to_unicode): Fix handling of doubled grave characters. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 6f662a449..1937a00ea 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2014-05-12 Daiki Ueno + + 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 * msgfmt.c (add_languages): New function split from get_languages. diff --git a/gettext-tools/src/filter-quote.c b/gettext-tools/src/filter-quote.c index d69bd615c..4cddf0908 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 dd47ea61d..ad6362dfe 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,7 @@ +2014-05-12 Daiki Ueno + + * msgfilter-quote-1: Test doubled grave characters. + 2014-05-10 Guido Flohr msgattrib: Add --empty option to clear msgstr diff --git a/gettext-tools/tests/msgfilter-quote-1 b/gettext-tools/tests/msgfilter-quote-1 index fe3364374..28b429aa5 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 "‘single quoted with grave’" msgid "single quoted with grave, empty `'" msgstr "single quoted with grave, empty ‘’" + +msgid "``double grave'" +msgstr "`‘double grave’" EOF ${DIFF} mfi-boldquot.ok mfi-boldquot.out || exit 1