]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
msgfilter: Fix quote handling of doubled grave charaters
authorDaiki Ueno <ueno@gnu.org>
Mon, 12 May 2014 09:14:54 +0000 (18:14 +0900)
committerDaiki Ueno <ueno@gnu.org>
Mon, 12 May 2014 09:14:54 +0000 (18:14 +0900)
* filter-quote.c (convert_ascii_quote_to_unicode): Fix handling of
doubled grave characters.

gettext-tools/src/ChangeLog
gettext-tools/src/filter-quote.c
gettext-tools/tests/ChangeLog
gettext-tools/tests/msgfilter-quote-1

index 6f662a44952a2d6bcc15773c2c6c2e6cb162c400..1937a00ea0fdb4ce5f30f97b5182d466772fc445 100644 (file)
@@ -1,3 +1,9 @@
+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.
index d69bd615c745307340e981bd9bbf7280c44ea933..4cddf0908563d9ec03f3bad7dba8ff9589d5c1ad 100644 (file)
@@ -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;
                 }
             }
index dd47ea61d299057aab861fe1d915956e33be0bb0..ad6362dfeefaef39721e3794b87a739f98147c79 100644 (file)
@@ -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
index fe3364374b01e4a4759cdeb7ea0dbd1b2b5ffdde..28b429aa55500a20cc2bfcd676db1633c9988250 100755 (executable)
@@ -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 "‘\e[1msingle quoted with grave\e[0m’"
 
 msgid "single quoted with grave, empty `'"
 msgstr "single quoted with grave, empty ‘\e[1m\e[0m’"
+
+msgid "``double grave'"
+msgstr "`‘\e[1mdouble grave\e[0m’"
 EOF
 
 ${DIFF} mfi-boldquot.ok mfi-boldquot.out || exit 1