vim: strange utf-8/latin1 interoperability problems
martin f krafft
madduck at madduck.net
Thu Jan 26 11:28:34 CET 2006
Sorry for cross-posting, but since I cannot figure out where the
problem lies, I think it's the best idea. Please respond to both
mailing list until it's clear that the error applies either to rxvt
or vim, not both.
I am using vim 6.4 (Debian 6.4-006+1) on an UTF-8 system with
The terminal is rxvt-unicode 7.0-1 (Debian). I am using the
and an en_GB.UTF-8 locale throughout.
I now have a latin1-encoded file to edit:
lapse:~/debian_de/content> file intro.tex
intro.tex: ISO-8859 text
The file uses a modline to set the encoding so that vim properly
lapse:~/debian_de/content> head -1 intro.tex
This works most of the time, but it happened twice now that all
latin1-specific characters would be messed up and and displayed them
as two separate characters, reminiscent of the utf-8 representation.
For instance, 'ä' would become 'Ã¤', which is rendered as separate
If I then set encoding=utf-8, the two characters change into one
character: <e4>. If, on the other hand, I set termencoding=latin1, it
all goes back to normal.
I think this is very strange because it only happens occasionally
but seems like a terminal window gone bad; I've deleted viminfo but
that did not do anything; so right now I have a terminal window open
which exhibits the problem, and a new one, where everything's fine.
What would you check to see how they differ? vim's configuration is
the same throughout, and the file is the same.
What is going on??? Thanks for any hints.
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
invalid/expired pgp (sub)keys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus at madduck.net
micro$oft windoze: proof that p. t. barnum was correct.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature (GPG/PGP)
More information about the rxvt-unicode