[Po4a-devel]Encoding options

Jordi Vilalta jvprat@wanadoo.es
Tue, 3 Aug 2004 23:46:50 +0200 (CEST)


On Tue, 3 Aug 2004, Denis Barbier wrote:
> On Tue, Aug 03, 2004 at 03:24:13PM +0200, Jordi Vilalta wrote:
>> Hi,
>>
>> Today I had a quick look around the charset options and I got some
>> questions:
>>
>> I haven't seen any named option for choosing the po file charset. Should
>> we have one (-P, --po-charset), or should we handle all the po files with
>> the same charset?
>
> PO files declare their encoding in their header field, so this option
> is only relevant when generating PO files.  This is done only once, and
> the one who generates PO files in this context does often not know which
> encoding is used, so it is better to have an invalid charset as in
>  "Content-Type: text/plain; charset=CHARSET\n"
> and let translators puts the right value.

Ok, good point of view. The other part is the charset of the msgids, 
because they have to be converted from the master file's charset to 
something. What should it be?

>> po4a-translate doesn't have the option to select the localized file
>> charset. Should we put it? Or may it take it from the po file?
>>
>> What should the defaults point to? iso-8859-1? utf-8? Something else?
>
> ISO-8859-1 is culturally biased, the only choices are UTF-8 and the
> charset of the PO file, so a --encoding=po|utf8 should be sufficient.
> I have no opinion about the default value.

Well, here I meant (for example) when gettextizing, if no charset is 
specified for the master file in command line, and the format module 
cannot determine which encoding is it using, we should convert it from 
something (the default?) to the po file encoding.

Uhmmm, now I've thought that maybe there should be no recoding between the 
master file and the po msgids. Am I right? I think I need some sleep :P

Regards,

Jordi Vilalta