bugGNU Typist - Bugs: bug #33957, Russian gettext l10n causes...

 
 

bug #33957: Russian gettext l10n causes "invalid value for msgid" error

Submitter:  Tim Marston <edam>
Submitted:  Fri 05 Aug 2011 04:13:53 PM UTC
   
 
Severity:  3 - Normal Priority:  5 - Normal
Status:  Invalid Privacy:  Public
Assigned to:  edam Open/Closed:  * Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Sep 2011 10:31:48 PM UTC, comment #2: 

Just to follow up... UTF-8 will be supported in version 2.9.

Tim Marston <edam>
Group administrator
Mon 08 Aug 2011 08:10:15 PM UTC, comment #1: 

This is not a bug afterall.

Turns out gettext is returning strings in the encoding requested via LANG. So, with LANG=ru_RU.koi8r, gtypist works as expected. With LANG=ru_RU.utf8, gettext returns UTF-8 encoded strings, which gtypist chokes on, as it doesn't support UTF-8 yet.

Tim Marston <edam>
Group administrator
Fri 05 Aug 2011 04:13:53 PM UTC, original submission:  

Code in gtypist.c (at line 2011 as of gtypist 2.8.5) performs the following check on a gettext-returned string which, in English, is "Y/N" and is used to determine valid entered characters at a yes/no prompt:

  if (strlen(YN) != 3 || YN[1] != '/' || !isupper(YN[0]) || !isupper(YN[2]))
      {
        fprintf( stderr,
         "%s: i18n problem: invalid value for msgid \"Y/N\": %s\n",
         argv0, YN );
        exit( 1 );
      }

When LANGUAGE=ru, the returned string fails the test, resulting in the error message.

I've looked in the .mo file (created during install from the .gmo file created at build time) and confirmed with strace that that file is being used and the string returned is the following byte sequence: 0xe4, '/', 0xee, 0. So, perhaps isupper() is returning false?

This only affects the 2.8 branch. As of gtypist 2.9, gettext will be returning UTF-8 strings, so this issue will be irrelevant.

Tim Marston <edam>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by edam (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.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-08-08 edam StatusConfirmed Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-0329.
    Corresponding source code