Juergen Spitzmueller wrote:

> (but if you insist, I'll change only the German varieties and leave the
> others to their users).

I don't insist, I was just wondering. If you like to change all languages
please go ahead.

>> Unfortunately this change does also affect the conversion from pre
>> unicode to utf8 in lyx2lyx, since lyx2lyx gets the encoding from the
>> languages file. If you now change encodings in the languages file this
>> conversion will be incorrect. Therefore this patch should only go in with
>> an additional part that freezes the encodings in lyx2lyx to the current
>> values.
> 
> What do you have in mind? A file format change?

No, see below.

> I don't see another way to 
> decide which encoding was actually used. And how do you handle the case
> where a user changed the languages file himself (which several have done
> to get the euro afaik)?

I don't know. And that is not handled by lyx2lyx btw. I was wrong, lyx2lyx
does not read the languages file directly but the generated file
lib/lyx2lyx/lyx2lyx_lang.py. That means that changes to the languages file
are currently ignored.
That does also mean that as long as lib/lyx2lyx/lyx2lyx_lang.py is not
regenerated all is OK and the languages file can be changed.

> And if he sends me his file then?

That is a problem. This is the same as changing a layout file and then
sending a .lyx file that uses that layout. I don't have any better idea
than to tell users to run lib/lyx2lyx/generate_encoding_info.py on their
old languages file (if they modified it) and delete it afterwards.

> Will this ever  
> work correctly? Isn't there a way to get the encoding from the file?

Only if it was explicitly set, and in that case that value is used.


Georg

Reply via email to