Hi,
When saving a lyx document in a "C" environment (LANG="C"),
lyx-1.1.5cvs saves its \lyxformat like this (2nd line of a lyx
document)
\lyxformat 2.16
When loading such a document in a German environment
(LANG="german"), lyx chokes on this directive and issues the
following error message:
Achtung: Benötige LyX-Format 2,16, die gewählte Datei enthält 2,00
[In English: Warning: need lyxformat 2,16 but found 2,00]
[BTW: Translating Warning with Achtung sucks - A Warning is a
"Warnung" in German - Achtung means "attention".]
When saving a lyx document in a German environment (LANG="german"),
this lyxformat is written to the file:
\lyxformat 2,16
Loading a lyx document containing \lyxformat 2,16 in any environment
gives the same warning as above.
AFAIS, lyx is trying to write the lyxformat's value as floats
(buffer.C and lyxlex.C), but doesn't consider that atof etc. are
subject to internationalization.
Running the tiny sample below in German, C and other environments
should demonstrate this issue.
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
float a = 2.16 ;
float b ;
char *lang = getenv("LANG");
setlocale(LC_ALL,lang);
b = atof( "2.17" );
fprintf( stdout, "%f %f\n", a, b );
return 0;
}
Ralf
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:[EMAIL PROTECTED] FAX: +49/731/501-999
http://www.faw.uni-ulm.de