Am 24.01.2016 um 19:08 schrieb Georg Baum <georg.b...@post.rwth-aachen.de>: > > Stephan Witt wrote: > >> Am 24.01.2016 um 18:17 schrieb Georg Baum >> <georg.b...@post.rwth-aachen.de>: >>> >>> Stephan, does the algo2e.tex test succeed if you apply the attached patch >>> on a clean tree? >> >> No, it doesn’t work. With the patch I get: > > It turned out that we used two different names for the latin1 encoding: > "ISO8859-1" and "ISO-8859-1" (iconv understands both). Does it work with the > attached patch? It should also print all encoding changes, and for e.g. > CJKutf8.tex you get several: > > Changing is encoding from ISO-8859-1 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing is encoding from ISO-8859-15 to UTF-8. > Changing is encoding from UTF-8 to ISO-8859-15. > Changing os encoding from UTF-8 to ISO-8859-15. > Changing os encoding from ISO-8859-15 to UTF-8. > > The two last ones are strange, the output file should be completely utf8. > >> Wouldn’t it be better to start over from the beginning with the new >> encoding in case it’s different from the current encoding (default or >> given by command line option)? > > This is the idea, yes, but before implementing it I'd like to know whether > it works in principle. This would require a two step approach for the case > that no command line option is given: Parse in latin1 encoding until > \usepackage[xxx]{inputenc} is found, close the file and open it again with > the correct encoding. Another idea would be to combine the fix for this bug > with the one for http://www.lyx.org/trac/ticket/8218: Guess the encoding of > the file, and then open it in the guessed encoding. Both approaches are not > a 100% solution, but would work for many cases.
Yes, this patch works for algo2e. Now the encoding was not changed anymore for latin1 inputenc. Now we have: 57% tests passed, 12 tests failed out of 28 Label Time Summary: cmplyx = 20.40 sec (14 tests) roundtrip = 11.74 sec (14 tests) Total Test time (real) = 32.20 sec The following tests FAILED: 12 - tex2lyx/roundtrip/CJK.tex (Failed) 13 - tex2lyx/cmplyx/CJK.tex (Failed) 14 - tex2lyx/roundtrip/CJKutf8.tex (Failed) 15 - tex2lyx/cmplyx/CJKutf8.tex (Failed) 16 - tex2lyx/roundtrip/test-insets-basic.tex (Failed) 17 - tex2lyx/cmplyx/test-insets-basic.tex (Failed) 18 - tex2lyx/roundtrip/test-insets.tex (Failed) 19 - tex2lyx/cmplyx/test-insets.tex (Failed) 20 - tex2lyx/roundtrip/test-memoir.tex (Failed) 21 - tex2lyx/cmplyx/test-memoir.tex (Failed) 24 - tex2lyx/roundtrip/test-refstyle-theorems.tex (Failed) 25 - tex2lyx/cmplyx/test-refstyle-theorems.tex (Failed) The complete tex2lyx output is attached. Stephan
LastTest.log
Description: Binary data