bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ommiting header causes multibyte errors


From: Ariel
Subject: Re: ommiting header causes multibyte errors
Date: Thu, 7 Jun 2007 10:26:24 -0400 (EDT)


On Thu, 7 Jun 2007, Bruno Haible wrote:

This is normal. A POT or PO file that does not carry a character encoding
specification in the header entry is assumed to be in ASCII. xgettext notices
that its output would violate this rule and gives a warning and an error.

In that case I would have appreciated this being documented near the
option for it, it would have saved me quite a bit of time.

OK, I'll mention this in the doc:

-Don't write header with @samp{msgid ""} entry.
+Don't write header with @samp{msgid ""} entry.  Note that using this option
+will lead to an error if the resulting file would not entirely be in ASCII.

Thanks.

Actually, perhaps ever better: generate a minimal header whenever the
source is non-ascii, and the option is on, since in that case the header
is required rather then containing optional data.

This is not really better, because if xgettext produces a minimal header
despite of --omit-header, it is most likely not what the user wanted.

Maybe - after all why is the user asking for no header? I can think of two reasons, mine (not to have anything extra), in which case a minimal header with the encoding etc (but only if it's required), is fine - in fact I prefer it.

And for the reason of no variance for testing, in which case it's still fine.

I can see no reason why someone would want to use --omit-header with a non-ascii file, making it a never-used option, so giving the option something to do would not be causing any harm that I can see.

But, maybe rename it to --minimal-header

(And having --omit-header have the side effect of converting to ascii just seems wrong, especially when there isn't an official option to do that in xgettext.)

Also, aesthetically, it looks bad to have a field which is empty, but looks
like it should have something.

When the format of PO files was specified 12 years ago, aesthetics did play
a role (which is why breaking long strings into lines is possible), but
 msgid ""
was not considered ugly.

It's not the msgid "", it's the empty: "Report-Msgid-Bugs-To: \n".

I just don't want the extra fields to appear in the file. I need to send
it to someone very non-technical and I want the absolute minimum in the
file.

Can you tell more: What is the non-technical person going to do with the
file? Reading it? Reviewing it? Editing it? What kind of tool is he/she using
for this purpose?

Editing it (adding the translations), and not with any tool written for .po files, just a text editor - probably notepad on windows, since it can handle UTF-8, and I know they have it.

And yes, I'm worried about them messing up the format, but I'll probably be able to fix it if that happens.

I'm asking because it sounds like some other format might be better suited
than the PO file format.

I didn't know there were any. (Besides .mo)

        -Ariel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]