Menu

#370 PO: charset is ignored

1.7
closed-fixed
nobody
5
2023-08-24
2008-02-29
Anonymous
No

Java 1.6.0_03
OmegaT 1.7.3_1

I fed a PO source file to OmegaT, in UTF8 without BOM.

The created target file in OmegaT was a ISO-8859-1 file with BOM (yes, with BOM).

(samuel here -- SF doesn't want me to log in today)

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Sorry, just checked, the source file does have a byte order mark.

     
  • Didier Briel

    Didier Briel - 2008-02-29
    • summary: PO outputs Latin-1 with BOM --> PO: charset is ignored
     
  • Didier Briel

    Didier Briel - 2008-02-29

    Logged In: YES
    user_id=1343245
    Originator: NO

    In fact, for PO, "automatic" (I suppose that was your setup) means the file is considered to use the system encoding.
    The charset is not used at all (e.g., "Content-Type: text/plain; charset=UTF-8\n"), which is I think the real bug.
    Another issue is that, while the BOM is respected, it does not trigger UTF-8 recognition.

    Often, when translating from English, we don't realise the charset was wrong already on reading.
    As I suppose most .po files would be in UTF-8 (rather than ISO-8859-1), a workaround for you would be to set .po files as UTF-8 (in Filter parameters).

    Didier

     
  • Rob Maris

    Rob Maris - 2012-10-08

    I'm quite new to OmegaT, and struggled over this minor lack of functionality. The docs state that normally, file content is displayed as per encoding spec when present in the source file (e.g. html). But with .po-files, one must set options to the .po filter, rather then setting any global option (as I expected).

     
  • Arno Peters

    Arno Peters - 2014-01-30

    I ran into this bug today.

    As a workaround I have put in a default encoding for .po files as UTF-8. This seems to be the current default encoding for .po files anyway. See the attached patch.

     
    • Didier Briel

      Didier Briel - 2014-02-03

      Committed to SVN (/trunk).

      Didier

       
  • Hiroshi Miura

    Hiroshi Miura - 2023-08-24
    • status: open --> closed-fixed
     
  • Hiroshi Miura

    Hiroshi Miura - 2023-08-24

    Fix had been published in v3.1.0 update 1
    The change is 6890e533

     

Log in to post a comment.

MongoDB Logo MongoDB