diff options
Diffstat (limited to 'runtime/doc/mbyte.txt')
-rw-r--r-- | runtime/doc/mbyte.txt | 69 |
1 files changed, 1 insertions, 68 deletions
diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 2a5ccc626e..8189ec5b38 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -100,8 +100,7 @@ See 'fileencoding', 'fileencodings' and |++enc|. DISPLAY AND FONTS If you are working in a terminal (emulator) you must make sure it accepts the -same encoding as which Vim is working with. If this is not the case, you can -use the 'termencoding' option to make Vim convert text automatically. +same encoding as which Vim is working with. For the GUI you must select fonts that work with the current 'encoding'. This is the difficult part. It depends on the system you are using, the locale and @@ -379,62 +378,11 @@ or when conversion is not possible: cp932, shift-jis, sjis cp936, euc-cn - *encoding-table* -Normally 'encoding' is equal to your current locale and 'termencoding' is -empty. This means that your keyboard and display work with characters encoded -in your current locale, and Vim uses the same characters internally. - -You can make Vim use characters in a different encoding by setting the -'encoding' option to a different value. Since the keyboard and display still -use the current locale, conversion needs to be done. The 'termencoding' then -takes over the value of the current locale, so Vim converts between 'encoding' -and 'termencoding'. Example: > - :let &termencoding = &encoding - :set encoding=utf-8 - -However, not all combinations of values are possible. The table below tells -you how each of the nine combinations works. This is further restricted by -not all conversions being possible, iconv() being present, etc. Since this -depends on the system used, no detailed list can be given. - -('tenc' is the short name for 'termencoding' and 'enc' short for 'encoding') - -'tenc' 'enc' remark ~ - - 8bit 8bit Works. When 'termencoding' is different from - 'encoding' typing and displaying may be wrong for some - characters, Vim does NOT perform conversion (set - 'encoding' to "utf-8" to get this). - 8bit 2byte MS-Windows: works for all codepages installed on your - system; you can only type 8bit characters; - Other systems: does NOT work. - 8bit Unicode Works, but only 8bit characters can be typed directly - (others through digraphs, keymaps, etc.); in a - terminal you can only see 8bit characters; the GUI can - show all characters that the 'guifont' supports. - - 2byte 8bit Works, but typing non-ASCII characters might - be a problem. - 2byte 2byte MS-Windows: works for all codepages installed on your - system; typing characters might be a problem when - locale is different from 'encoding'. - Other systems: Only works when 'termencoding' is equal - to 'encoding', you might as well leave it empty. - 2byte Unicode works, Vim will translate typed characters. - - Unicode 8bit works (unusual) - Unicode 2byte does NOT work - Unicode Unicode works very well (leaving 'termencoding' empty works - the same way, because all Unicode is handled - internally as UTF-8) - CONVERSION *charset-conversion* Vim will automatically convert from one to another encoding in several places: - When reading a file and 'fileencoding' is different from 'encoding' - When writing a file and 'fileencoding' is different from 'encoding' -- When displaying characters and 'termencoding' is different from 'encoding' -- When reading input and 'termencoding' is different from 'encoding' - When displaying messages and the encoding used for LC_MESSAGES differs from 'encoding' (requires a gettext version that supports this). - When reading a Vim script where |:scriptencoding| is different from @@ -507,17 +455,6 @@ For example, you can run Vim in a xterm with added multi-byte support and/or |XIM|. Examples are kterm (Kanji term) and hanterm (for Korean), Eterm (Enlightened terminal) and rxvt. -If your terminal does not support the right encoding, you can set the -'termencoding' option. Vim will then convert the typed characters from -'termencoding' to 'encoding'. And displayed text will be converted from -'encoding' to 'termencoding'. If the encoding supported by the terminal -doesn't include all the characters that Vim uses, this leads to lost -characters. This may mess up the display. If you use a terminal that -supports Unicode, such as the xterm mentioned below, it should work just fine, -since nearly every character set can be converted to Unicode without loss of -information. - - UTF-8 IN XFREE86 XTERM *UTF8-xterm* This is a short explanation of how to use UTF-8 character encoding in the @@ -1368,10 +1305,6 @@ If your system does not provide support for typing utf-8, you can use the 'keymap' feature. This allows writing a keymap file, which defines a utf-8 character as a sequence of ASCII characters. See |mbyte-keymap|. -Another method is to set the current locale to the language you want to use -and for which you have a XIM available. Then set 'termencoding' to that -language and Vim will convert the typed characters to 'encoding' for you. - If everything else fails, you can type any character as four hex bytes: > CTRL-V u 1234 |