bugGNU gettext - Bugs: bug #49955, xgettext parses wrongly hex...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #49955: xgettext parses wrongly hex escapes in concatenated literals

Submitter:  Chusslove Illich <caslav_ilic>
Submitted:  Thu 29 Dec 2016 10:18:47 PM UTC
   
 
Category:  C Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Sun 04 Nov 2018 11:43:01 PM UTC, comment #2: 

It is indeed a duplicate of bug #46756, and it is fixed now.
Thanks for the report.

Bruno Haible <haible>
Group administrator
Fri 30 Dec 2016 02:30:05 AM UTC, comment #1: 

I think this is a duplicate of:
https://savannah.gnu.org/bugs/?46756

Thanks for the report and the analysis, anyway.

Daiki Ueno <ueno>
Group administrator
Thu 29 Dec 2016 10:18:47 PM UTC, original submission:  

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).

Chusslove Illich <caslav_ilic>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by caslav_ilic (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2018-11-04 haible StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed
    2018-01-06 haible CategoryProgrammer tools C
    2016-12-29 caslav_ilic Attached File- Added concat-literal-hex-escape-01.c, #39329

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code