bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] [bug #49955] xgettext parses wrongly hex escapes in concat


From: Chusslove Illich
Subject: [bug-gettext] [bug #49955] xgettext parses wrongly hex escapes in concatenated literals
Date: Thu, 29 Dec 2016 22:18:48 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

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

[Prev in Thread] Current Thread [Next in Thread]