Jean-Marc Lasgouttes wrote: > Le 15/02/2013 19:03, Kornel Benko a écrit : >> Thanks Jean-Mark. But a new error raised: import of CJKutf8.tex >> >> goes wrong. >> >> This file is really short. The string "hello" should not be lost IMHO. > > The ugly bug with verbatim environment is now fixed. The problem with > CJK encoding is much more annoying. I am surprised that it did not exist > before my changes from today, actually.
Maybe it did exist, and bug 8525 was a symptom? I still do not really understand why bug 8525 was only be seen by Uwe. Maybe gcc did optimize a call of good() away (because it short circuited a boolean condition), and msvc did not see the short cut, and so good() was called more often with the windows version? > The problem is that the CJK environment changes the encoding and that > the first character of this environment will be read by the code that > looks for newlines (because one has to check for double newlines). Actually, the problem was the greedy tokenizing of the Parser class: Parser::good() did always ensure that there is at least one unparsed token in the vector. This is actually not needed, and I fixed this in rev. 25fe87e55c. I also removed the direct access to the real stream of iparserdocstream, since it can easily be misused by calling methods like good() etc. which need to take into account the put back string. Now CJKutf8.tex is again converted correctly even if the workaround rev. fb64fe613f50 is reverted (modulo the babel issue found by Uwe which I will fix later). Georg