Loading ...
Sorry, an error occurred while loading the content.
 

Vim 6.0z, Chinese input problem

Expand Messages
  • Stephan Hegel
    Hi all, I am using rxvt-2.7.2 (in GB encodings with switch -km gb) with vim-6.0z. For input I use xcin-2.5.2. Encoding in vim is set to chinese . When I try
    Message 1 of 2 , Apr 7, 2001
      Hi all,

      I am using rxvt-2.7.2 (in GB encodings with switch -km gb) with
      vim-6.0z. For input I use xcin-2.5.2. Encoding in vim is set to
      "chinese".

      When I try to type in the Chinese character for "wo3" (English:
      "I") in vim I get the wrong character displayed and finally saved.
      Examining the file shows the encoding is 0xf6d2.
      On the rxvt commandline the right character is displayed when typing
      in via xcin. When I "echo" this character from the rxvt commandline
      into a file I get another encoding: 0xced2.
      Many other characters work fine, e.g. "zhong1" (English: "middle")
      creates with both methods the same encoding 0xd6d0. And much more
      hanzi work fine.

      Since rxvt works I do not assume a problem with xcin or rxvt. I guess
      there must be a small problem in vim ? Or did I miss something ?

      Any idea to solve this ?
      Thanks,
      Stephan.


      --
      GMX - Die Kommunikationsplattform im Internet.
      http://www.gmx.net
    • Bram Moolenaar
      ... If you set encoding to chinese this will be aliased to euc-cn . ... Vim is not supposed to change characters. Unless you have termencoding set, in
      Message 2 of 2 , Apr 7, 2001
        Stephan Hegel wrote:

        > I am using rxvt-2.7.2 (in GB encodings with switch -km gb) with
        > vim-6.0z. For input I use xcin-2.5.2. Encoding in vim is set to
        > "chinese".

        If you set 'encoding' to "chinese" this will be aliased to "euc-cn".

        > When I try to type in the Chinese character for "wo3" (English:
        > "I") in vim I get the wrong character displayed and finally saved.
        > Examining the file shows the encoding is 0xf6d2.
        > On the rxvt commandline the right character is displayed when typing
        > in via xcin. When I "echo" this character from the rxvt commandline
        > into a file I get another encoding: 0xced2.
        > Many other characters work fine, e.g. "zhong1" (English: "middle")
        > creates with both methods the same encoding 0xd6d0. And much more
        > hanzi work fine.
        >
        > Since rxvt works I do not assume a problem with xcin or rxvt. I guess
        > there must be a small problem in vim ? Or did I miss something ?

        Vim is not supposed to change characters. Unless you have 'termencoding' set,
        in which case translation between 'termencoding' and 'encoding' is performed.

        What is your current locale set to? You can use ":lang" in Vim to find out.
        So, let's see the output of:

        :set encoding termencoding
        :lang

        --
        hundred-and-one symptoms of being an internet addict:
        72. Somebody at IRC just mentioned a way to obtain full motion video without
        a PC using a wireless protocol called NTSC, you wonder how you never
        heard about it

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      Your message has been successfully submitted and would be delivered to recipients shortly.