URL:
  <http://savannah.gnu.org/bugs/?49955>

                 Summary: xgettext parses wrongly hex escapes in concatenated
literals
                 Project: GNU gettext
            Submitted by: caslav_ilic
            Submitted on: Thu 29 Dec 2016 10:18:47 PM GMT
                Category: Programmer tools
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The following two messages are same, but the first one produces "invalid
multibyte sequence" warnings, when extracted using xgettext --from-code=UTF-8
concat-literal-hex-escape-01.c (attached):

  gettext("1 foobarqwyx" "\xc2\x9c" "1 fbq");
  gettext("1 foobarqwyx" "\u009c" "1 fbq");

It appears parsing works by first concatenating the literal, and then
resolving escapes, so "...\x9c" "1..." is interpreted as "...\x9c1...". When
e.g. a space is inserted before 1 in the last literal segment, extraction
works (single message in the POT).




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 29 Dec 2016 10:18:47 PM GMT  Name: concat-literal-hex-escape-01.c 
Size: 86B   By: caslav_ilic

<http://savannah.gnu.org/bugs/download.php?file_id=39329>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49955>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


Reply via email to