bugGNU gettext - Bugs: bug #20923, msgen may produce a PO file with...

 
 

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

bug #20923: msgen may produce a PO file with charset set to CHARSET

Submitter:  None
Submitted:  Tue 28 Aug 2007 05:42:36 PM UTC
   
 
Category:  Programmer tools Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Jump to the original submission

Sun 01 Dec 2024 04:31:50 PM UTC, comment #6: 

The fix is contained in gettext 0.23.

Bruno Haible <haible>
Group administrator
Tue 15 Oct 2024 02:15:17 PM UTC, comment #5: 

It is OK that xgettext produces an ASCII-encoded .pot file with charset=CHARSET, since it is the translator's choice which encoding to use for this file. (Yes, still in 2024.) If xgettext would produce output with charset=ASCII, this would cause trouble with the editor used by the translator. If xgettext would produce output with charset=UTF-8 (but only ASCII characters), it would be an undue restriction of choice for the translator.

msgfmt still produces the warning:

en.po: warning: Charset "CHARSET" is not a portable encoding name.
                Message conversion to user's charset might not work.

and rightfully so, since the charset in the header entry is used for charset conversion at run time.

Therefore, really, msgen needs to set ASCII as charset, just like 'msginit --no-translator -l en' does.

Fixed through https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=eeab24002b569910c5d244435bd774f3cdeaed0b .

(, , , )

Bruno Haible <haible>
Group administrator
Mon 14 Oct 2024 01:56:21 AM UTC, comment #4: 

Starting with version 0.22.1, msgcat does not produce this error any more.

Bruno Haible <haible>
Group administrator
  Spam posted by arsen
  Spam posted by anonymous
Wed 29 Aug 2007 10:10:59 PM UTC, comment #1: 

Indeed there is a problem:

$ cat > x.c
gettext ("hallo world");

$ xgettext -o foo.pot x.c
$ msgen foo.pot > en.po
$ msgcat en.po
en.po: warning: Charset "CHARSET" is not a portable encoding name.
                Message conversion to user's charset might not work.
msgcat: present charset "CHARSET" is not a portable encoding name

I eee it more as a bug in 'msgen'.

Bruno Haible <haible>
Group administrator
Tue 28 Aug 2007 05:42:36 PM UTC, original submission:  

This makes it hard to process the .pot file with the other gettext tools:

For example, generating a default translation with msgen works, but the generated default.po file can't be processed with msgfmt since the charset is not set.

Is there a way around that?

Otherwise it would make sense to provide the -t argument for xgettext and allow users to specify the charset for the .pot file.

Thanks,
Felix Berger

Anonymous

 

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

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 arsen (Posted a comment)
  • -email is unavailable- added by haible (Posted a comment)
  •  

    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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-12-01 haible StatusFixed Fix Released
    2024-10-15 haible StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Summaryxgettext generates .pot files with charset set to CHARSET msgen may produce a PO file with charset set to CHARSET
    2016-11-26 haible CategoryNone Programmer tools
    2007-08-29 haible StatusNone Confirmed
    2007-08-29 haible Assigned toNone haible

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code