dotgnu-pnet
[Top][All Lists]
Advanced

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

Re: [Pnet-developers] [bug] resgen produces junk for valid PO files


From: Bruno Haible
Subject: Re: [Pnet-developers] [bug] resgen produces junk for valid PO files
Date: Mon, 29 Dec 2003 12:52:09 +0100
User-agent: KMail/1.5

Rhys Weatherley wrote:
> I've already addressed your concerns, including fixing the other .po bugs
> you found.

Thanks a lot!

> I realize that the UTF-8 default may be a little surprising if you are used
> to everything being "whatever my system uses by default", but the behaviour
> is documented and consistent with all of the other .NET tools that use
> UTF-8 by default unless otherwise qualified.

That's OK on output, and it's also OK for input streams/files, unless there
is evidence that the input is in another encoding. Which is the case for
PO files, which carry their encoding in the header entry. (Remember that
PO files are produced by translators, and more than 50% of the translators
are still working in non-UTF-8 environments.)

To correct this issue, maybe resgen could spawn a subprocess, invoking
"msgconv -t UTF-8", when it sees that the encoding marked in the header
entry is not UTF-8, and then read from msgconv's output. Or invoke
"msgfmt --csharp-resources ..." right away. I'm adding to msgfmt the
option --csharp-resources, that will direct msgfmt to produce a .resources
file; this is implemented through a small C# program that invokes the
ResourceWriter class.

Bruno



reply via email to

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