If a multibyte Unicode character is the first thing after a \, the LaTeX lexer improperly styles the first byte of this character. This result in broken rendering of the character.
I don't know LaTeX so I can't tell what exactly to do with non-ASCII characters as part of a command, but the attached patch fixes the issue by not styling non-ASCII bytes right after a \.
BTW, the better fix would probably be to use StyleContext since now it handles Unicode characters, but this would require more work and I'd be afraid to break something.
Attached is a sample file that shows the issue (to use with the LaTeX lexer, not the TeX one).
Committed as [8b789a].
Related
Commit: [8b789a]