At 04:38 AM 3/6/2007, Frank Küster wrote:
Hm, Benoît has pointed out that it's more than "a small glitch" > I think it would be a good idea to document the "extendedchars=false" > workaround also for that, much more common, case, or make it unnecessary > (cannot this be detected automatically?). The problem is that the dvi file produced with extendedchares=false is wrong. Instead of 'réseau', it prints 'érseau':
[...]
Any idea how to fix this?
Unfortunately, at this point the only suggestion I have is that extended characters from packages that support multibyte characters need to go within TeX escapes within the listing. I believe that works. (To do that within the C++ example you included, just include "texcl" to the lstset options list. It's a bit more complicated in the sh example, and there may not be a completely satisfactory solution there.)
I had thought that extendedchars=false was sufficient, because the problem was originally reported with Chinese characters, where the misordering (and incorrect font, in some cases) is not visible, since they're not mixed with non-extended characters. It seems that I was wrong.
Unfortunately, making listings compatible with multibyte characters is going to be a long-term project. It is, however, the top long-term project on my priority queue, which means that there is some possibility that it will happen by the 1.5 release.
Sorry I don't have better news. - Brooks