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:  C Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned 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
  • -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)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    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.3