On Tue, Aug 20, 2002 at 10:42:23AM +0200, Bram Moolenaar wrote: > > Radovan Garabik wrote: > > > do also: > > set fileencoding=utf-8 > > so that you do not encounter those nasty CONVERSION ERRORs > > The value of 'fileencoding' is changed as soon as you open a file. It's
and that sucks a lot. Generally, I know what is the encoding of a file I am going to edit. I never want the editor to play smart. (especially when I encounter illegal utf-8 sequences in utf-8 files now and then) > used to remember the encoding of the file (can be different from the > encoding used inside Vim). You can also change it after reading a file, > so that ":w" writes it with a different encoding. and probably with CONVERSION ERROR as well, since there are characters that cannot be converted... > > You probably want to set 'fileencodings' to "utf-8" or make it empty. > Then Vim won't check for a BOM or fall back to using latin1. You still > get CONVERSION ERRORs when editing a file with an illegal byte sequence, > and that's a good hint for the user. > I would much prefer something like "INVALID UTF-8 SEQUENCE" message displayed when _opening_ the file. > > I think a discussion about whether receiving a latin1 file which is > automatically converted to UTF-8 counts as being on a UTF-8-only planet > or not isn't very useful. Point is that you do need the conversion now > and then. point is, latin1 is not the only encoding you are going to encounter (and way too many users are likely to encounter _other_ default encodings), and the conversion should be done manually off the editor. Automatic conversions are evil. -- ----------------------------------------------------------- | Radovan Garabik http://melkor.dnp.fmph.uniba.sk/~garabik/ | | __..--^^^--..__ garabik @ melkor.dnp.fmph.uniba.sk | ----------------------------------------------------------- Antivirus alert: file .signature infected by signature virus. Hi! I'm a signature virus! Copy me into your signature file to help me spread! -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
