Am Sonntag, 15. Oktober 2017 um 19:38:45, schrieb Uwe Stöhr <uwesto...@web.de> > El 14.10.2017 a las 21:09, Kornel Benko escribió: > > > What is the exact directory name of Additional.lyx on your platform? > > D:\LyXGit\2.3.x\lib\doc > (like all other doc files) > > > Check also \origin part of Additional.lyx. > > it is correctly this: > \origin /systemlyxdir/doc/ > > > Can it be that python looks for wrong encoding (e.g. cp1252) which does > > _not_ contain 0x9d char. > > I explicitly saved the file now using UTF8 encoding. But since Python > uses nevertheless CP1252 I need a method how to force Python to use > utf8. How can I do this on the file ReplaceValues.py ? > > That is definitely the bug: Python expects CP1252 while it is not. For > example In additional.lyx I get this error when saving in CP1252: > > D:\LyXGit\2.3.x\lib\doc\Additional.lyx: > Cannot save: java.io.CharConversionException: Failed to encode the character > '�' (U+FFFD) at column 4 in line 24002 with the encoding "Cp1252". > > This is a quate character which does not exists in CP1252. When I delete > this character ReplaceValues.py works fine. > We have many more uft8-only chars in our other doc files, so the only > solution is to force Python to expect uft8.
As I think I proposed in the attached part in other mail. Essentially, there is the change of open(file) to codecs.open(file, 'r', 'UTF-8') > thanks and regards > Uwe Kornel
signature.asc
Description: This is a digitally signed message part.