On Fri, 15 Jan 2010 08:20:13 +0100 Tomas Bodzar <tomas.bod...@gmail.com> wrote:
> > > > Do you want to use UTF-8 ? > > > > Or do you want to use 8-bit, single byte, ISO 8859-2 ? > > > > I want to use both because of my translations for OpenBSD project so I > can get CVS access and send updates by myself. I was doing it on Linux > or OpenSolaris, but now I will be working with OpenBSD and I will use > OpenBSD as only one OS on my laptop. In fact I don't need CZ for > normal work or use, but I need it for translations. I was able to read > CZ texts in Emacs without need for some modifications, but I don't > like Emacs. I prefer vi, vim, gvim or beaver. After my tests I was > able to read or write CZ texts, but read was possible only in Emacs. > In vi, vim, gvim, beaver I had garbage. > In vim or gvim, you need to set at least one if not two encodings :set encoding=iso-8859-2 :set fileencoding=iso-8859-2 OR :set encoding=utf-8 :set fileencoding=utf-8 When using fileencoding (also "fenc") you can actually do *conversions* on files such as from UTF-8 to ISO-8859-2 but occasionally this can cause a loss of information. You should probably read over :help fenc :help enc to understand how vim/gvim works a bit better. As for vi(1) in base, I'm really not sure how to deal with the 'cz' encodings (ISO-9959-2). With the 'cz' keyboard layout, some of the special (accented/diacritic) characters work with vi in UTF-8 via uxterm but not all of them. > > It's my fault as I thought thanks to output from file(1) that beaver > can do UTF-8. Of course that I know that there is no UTF-8 locale in > OpenBSD so I must use eg. uxterm(1). > beaver *should* be able to read/display files that it can write! --but things are seldom as they "should" be. I'm not impressed with beaver. I just finished porting the newest release candidate of beaver 0.4.0rc1 and it was a real GNU-isance. The installer script is badly behaved and scribbles all over the file system (rather than respecting PREFIX and staying in the ports/pobj/. hierarchy). I had to write my own installer to get the port to package up properly. Now that I can build the new package, beaver dies with a seg fault and core dump. Typically, "Release Candidates" are not acceptable submissions for the ports tree since they are buggy and the final release is supposedly just around the corner. There are a few RC's in the ports tree, but you usually need a darn good reason for it to be included. If you really want a "MS-notepad-ish" editor, 'kate' in KDE is reasonably good but as a part of KDE, you'll have to install a ton of dependencies, including kde itself. > > Again my fault. I thought that gvim can display UTF-8 automatically > as Emacs. > emacs can and will do "interesting" things to files, such as adding a first line that says "Hey EMACS" and notes the encoding. This can often make a real mess of important files. --