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

Submitted by:  Chusslove Illich <caslav_ilic>
Submitted on:  Thu 29 Dec 2016 10:18:47 PM UTC  
 
Category: Programmer toolsSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

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>
Project 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>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 29 Dec 2016 10:18:47 PM UTCcaslav_ilicAttached File-=>Added concat-literal-hex-escape-01.c, #39329

    Back to the top


    Powered by Savane 3.1-cleanup1