Markus Kuhn wrote:
> By the way, even though on my planets here, all coded text in files that
> we edit is exclusively in UTF-8, this does *not* mean that all the files
> I edit are free of malformed UTF-8 sequences.
>
> There are many real-world file formats (e.g., PBM) that start with a
> plaintext header and end in binary data data. Here on my planet, the
> plaintext headers are of course in UTF-8, but to edit it, I also have to
> load the binary data at the end of the file into the editor buffer, and
> this should not affect the integrity of the file or reduce my
> convenience in editing the UTF-8 headers. I preferably want the editor
> to show bytes of malformed sequences in some hex notation and preserve
> them exactly when I save the file again. [The UTF-8 mode of Emacs 21.2
> is not yet able to do this, which is why Emacs is not yet a popular
> editor on my planet.]
The Vim defaults are such that most people can do their work without
additional settings. Since most people live on a planet where UTF-8 is
still the new kid on the block, when Vim detects a malformed UTF-8
sequence it assumes the file is not UTF-8. It's probably latin1 or some
DBCS encoding then. The Vim users on your planet will have to add a
setting. It's not possible to make the default please people of all
planets.
I suppose you have:
:set fencs=
in your ~/.vimrc. That should make it work as you explained above.
People on other planets that ocassionally want to force editing a file
with UTF-8 can use:
:edit ++enc=utf-8 filename
--
hundred-and-one symptoms of being an internet addict:
252. You vote for foreign officials.
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.moolenaar.net \\\
/// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
\\\ Project leader for A-A-P -- http://www.a-a-p.org ///
\\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/