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

Re: Cannot input Chinese character "文" in vim

Expand Messages
  • Tony Mechelynck
    ... [...] You mean there is no reply, not even enc= tenc= ???? Best regards, Tony. -- For an adequate time call 555-3321 -- You received this message from
    Message 1 of 14 , Dec 4, 2011
    • 0 Attachment
      On 05/12/11 02:21, Fuzzier Tang wrote:
      > I installed Vim 7.3.363 (32-bit).
      > After I start Vim (not gVim) as vim.exe -N -u NORC,
      > the reply to :set enc tenc is
      >
      > On Sun, Dec 4, 2011 at 2:09 PM, lilydjwg <lilydjwg@...
      > <mailto:lilydjwg@...>> wrote:
      [...]


      You mean there is no reply, not even
      enc=
      tenc=
      ????



      Best regards,
      Tony.
      --
      "For an adequate time call 555-3321"

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Gauchyler@gmail.com
      I installed Vim 7.3.363 (32-bit). After I start Vim (not gVim) as vim.exe -N -u NORC as recommended by Tony, the reply to :set enc tenc is encoding=cp936
      Message 2 of 14 , Dec 4, 2011
      • 0 Attachment
        I installed Vim 7.3.363 (32-bit).
        After I start Vim (not gVim) as vim.exe -N -u NORC as recommended by
        Tony,
        the reply to :set enc tenc is
        encoding=cp936
        termencoding=
        Still, "文" is not accepted by vim.exe.

        However, I can input "文(cp936 0xcec4)" as ^vucec4.


        On Dec 4, 1:53 am, Tony Mechelynck <antoine.mechely...@...>
        wrote:
        > On 03/12/11 15:58, Fuzzier wrote:
        >
        >
        >
        >
        >
        > > Hello!
        >
        > > I'm trying to input a Chinese character "文" (U+6587) in vim.
        > > However, it seems vim refuses to accept the character.
        > > I changed the encoding from the default cp936 to utf8, but it doesn't help.
        > > In gvim, everything is OK.
        >
        > > My OS is Simplified Chinese Windows 7 Home Basic (64-bit).
        > > The installed vim/gvim version is 73_46 (32-bit).
        >
        > > Please help!
        >
        > > 0: View current encoding
        > >http://vim.1045645.n5.nabble.com/file/n5044657/0_view_encoding_settin...
        >
        > > 1: try to input "文"
        > >http://vim.1045645.n5.nabble.com/file/n5044657/1_start_edit_mode.jpg
        >
        > > 2: after selecting the character "文"
        > >http://vim.1045645.n5.nabble.com/file/n5044657/2_after_selecting_the_...
        >
        > > 3: try to input "文明"
        > >http://vim.1045645.n5.nabble.com/file/n5044657/3_try_to_input_a_word.jpg
        >
        > > 4: "文" is missing, only "明" is accepted
        > >http://vim.1045645.n5.nabble.com/file/n5044657/4_after_selecting_the_...
        >
        > Hm, strange. Does it work if you disable the IME and use "pure Vim"
        > input techniques? e.g. Ctrl-V u 6587 (without the spaces) — replace
        > Ctrl-V by Ctrl-Q if you use Ctrl-V to paste — see :help i_CTRL-V_digit —
        > I know it ought to work with 'encoding' set to UTF-8, I don't know about
        > cp936.
        >
        > What is the reply to
        >         :set enc? tenc?
        > - in your usual Vim
        > - after starting Vim as
        >         vim -N -u NORC
        > ?
        >
        > Do you know the cp936 representation of the problematic character? In
        > UTF-8 it is represented as hex E6 96 87 which doesn't ring a bell with
        > me as a possible source of problems.
        >
        > Or you might try installing Vim 7.3.363 (32-bit Windows version) fromhttp://sourceforge.net/projects/cream/files/Vim/
        >
        > Best regards,
        > Tony.
        > --
        > Finagle's Second Law:
        >         No matter what the anticipated result, there will always be
        > someone eager to (a) misinterpret it, (b) fake it, or (c) believe it
        > happened according to his own pet theory.

        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Tony Mechelynck
        ... Well, I don t know then. Bram, can you reproduce? Best regards, Tony. -- Weinberg s Second Law: If builders built buildings the way programmers wrote
        Message 3 of 14 , Dec 4, 2011
        • 0 Attachment
          On 05/12/11 03:08, Gauchyler@... wrote:
          > I installed Vim 7.3.363 (32-bit).
          > After I start Vim (not gVim) as vim.exe -N -u NORC as recommended by
          > Tony,
          > the reply to :set enc tenc is
          > encoding=cp936
          > termencoding=
          > Still, "文" is not accepted by vim.exe.
          >
          > However, I can input "文(cp936 0xcec4)" as ^vucec4.

          Well, I don't know then. Bram, can you reproduce?


          Best regards,
          Tony.
          --
          Weinberg's Second Law:
          If builders built buildings the way programmers wrote programs,
          then the first woodpecker that came along would destroy civilization.

          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Bram Moolenaar
          ... How is this character entered? -- hundred-and-one symptoms of being an internet addict: 241. You try to look for Net Search even when you re in File
          Message 4 of 14 , Dec 5, 2011
          • 0 Attachment
            Tony Mechelynck wrote:

            > On 05/12/11 03:08, Gauchyler@... wrote:
            > > I installed Vim 7.3.363 (32-bit).
            > > After I start Vim (not gVim) as vim.exe -N -u NORC as recommended by
            > > Tony,
            > > the reply to :set enc tenc is
            > > encoding=cp936
            > > termencoding=
            > > Still, "文" is not accepted by vim.exe.
            > >
            > > However, I can input "文(cp936 0xcec4)" as ^vucec4.
            >
            > Well, I don't know then. Bram, can you reproduce?

            How is this character entered?

            --
            hundred-and-one symptoms of being an internet addict:
            241. You try to look for Net Search even when you're in File Manager.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ an exciting new programming language -- http://www.Zimbu.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • Gauchyler@gmail.com
            To reproduce the problem: 1. in control panel, region and language, change system locale to Chinese (Simplified, RPC), an OS restart is required.
            Message 5 of 14 , Dec 5, 2011
            • 0 Attachment
              To reproduce the problem:
              1. in control panel, region and language, change system locale to
              Chinese (Simplified, RPC), an OS restart is required.
              http://s200.photobucket.com/albums/aa74/Fuzzier/vim/?action=view¤t=1changesystemlocale.jpg

              2. in control panel, region and language, change keyboards to add an
              IME for Chinese Simplified (i.e. Chinese Simplified QuanPin (version
              6.0)).
              http://s200.photobucket.com/albums/aa74/Fuzzier/vim/?action=view¤t=2addime.jpg

              3. start vim.exe, press 'i' to enter insert mode, then turn on Chinese
              Simplified QuanPin (version 6.0) IME.
              (When IME is turned on, hit SHIFT to switch between Chinese input mode
              and Enlish input mode. E.g. you need to switch to English input mode
              to input commands in vim.)
              http://s200.photobucket.com/albums/aa74/Fuzzier/vim/?action=view¤t=3viminsertmodewithime.jpg

              4. press 'wen' to input the character “文” (There're several of
              candicates, press a number key to select one. In the picture, just
              press '2'. Then you'll see the character is underlined, press 'Esc' to
              confirm), the character is no accepted.
              http://s200.photobucket.com/albums/aa74/Fuzzier/vim/?action=view¤t=4presswen.jpg

              5. press 'wenming' to input the word "文明" (again, press '1', then
              'Esc'), "文" is not shown, only the second character "明" is on screen.
              http://s200.photobucket.com/albums/aa74/Fuzzier/vim/?action=view¤t=5presswenming.jpg
              http://s200.photobucket.com/albums/aa74/Fuzzier/vim/?action=view¤t=6result1.jpg

              6. yet another test, press ''wuwennongmo", the word "舞文弄墨" shows up,
              then press '1'.
              http://s200.photobucket.com/albums/aa74/Fuzzier/vim/?action=view¤t=7test2.jpg
              http://s200.photobucket.com/albums/aa74/Fuzzier/vim/?action=view¤t=8result2.jpg




              On Dec 6, 4:00 am, Bram Moolenaar <B...@...> wrote:
              > Tony Mechelynck wrote:
              > > On 05/12/11 03:08, Gauchy...@... wrote:
              > > > I installed Vim 7.3.363 (32-bit).
              > > > After I start Vim (not gVim) as vim.exe -N -u NORC as recommended by
              > > > Tony,
              > > > the reply to :set enc tenc is
              > > >    encoding=cp936
              > > >    termencoding=
              > > > Still, "文" is not accepted by vim.exe.
              >
              > > > However, I can input "文(cp936 0xcec4)" as ^vucec4.
              >
              > > Well, I don't know then. Bram, can you reproduce?
              >
              > How is this character entered?
              >
              > --
              > hundred-and-one symptoms of being an internet addict:
              > 241. You try to look for Net Search even when you're in File Manager.
              >
              >  /// Bram Moolenaar -- B...@... --http://www.Moolenaar.net  \\\
              > ///        sponsor Vim, vote for features --http://www.Vim.org/sponsor/\\\
              > \\\  an exciting new programming language --http://www.Zimbu.org       ///
              >  \\\            help me help AIDS victims --http://ICCF-Holland.org   ///

              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Stephen Lee
              Hello For you reference, I am using Simplified Chinese Windows xp sp3. Windows imposes a lot of limitations on console (DOS mode): The internal encoding has to
              Message 6 of 14 , Dec 6, 2011
              • 0 Attachment
                Hello

                For you reference, I am using Simplified Chinese Windows xp sp3.
                Windows imposes a lot of limitations on console (DOS mode): The
                internal encoding has to be in codepages while the output can be in
                codepages or in unicode. I think problems happened during encoding
                conversion. Gvim hence appears to overcome these limitations. I use
                gvim all the time and avoid vim. This this also the reason I am going
                to change my system to linux as it has consistent encoding - utf8.

                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • Fuzzier Tang
                Thank you for your comfirmation, Stephen. I actually use gVim rather than Vim under Windows system, so the problem doesn t matter much. Although, I personally
                Message 7 of 14 , Dec 6, 2011
                • 0 Attachment
                  Thank you for your comfirmation, Stephen.
                  I actually use gVim rather than Vim under Windows system, so the problem doesn't matter much.
                  Although, I personally think it's strange that the character "文" cannot be input into Vim while other characters can.



                  On Wed, Dec 7, 2011 at 7:29 AM, Stephen Lee <stephenletterbox@...> wrote:
                  Hello

                  For you reference, I am using Simplified Chinese Windows xp sp3.
                  Windows imposes a lot of limitations on console (DOS mode): The
                  internal encoding has to be in codepages while the output can be in
                  codepages or in unicode. I think problems happened during encoding
                  conversion. Gvim hence appears to overcome these limitations. I use
                  gvim all the time and avoid vim. This this also the reason I am going
                  to change my system to linux as it has consistent encoding - utf8.

                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php



                  --
                  阿弥陀佛

                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                • Stephen Lee
                  ... I encountered similar problems from time to time, not even only vim. Simplified Chinese encoding in Windows is cp936. Conversion between cp936 and utf-8 is
                  Message 8 of 14 , Dec 7, 2011
                  • 0 Attachment
                    On Dec 7, 9:32 am, Fuzzier Tang <gauchy...@...> wrote:
                    > Thank you for your comfirmation, Stephen.
                    > I actually use gVim rather than Vim under Windows system, so the problem
                    > doesn't matter much.
                    > Although, I personally think it's strange that the character "文" cannot be
                    > input into Vim while other characters can.
                    >
                    > On Wed, Dec 7, 2011 at 7:29 AM, Stephen Lee <stephenletter...@...>wrote:
                    >
                    > > Hello
                    >
                    > > For you reference, I am using Simplified Chinese Windows xp sp3.
                    > > Windows imposes a lot of limitations on console (DOS mode): The
                    > > internal encoding has to be in codepages while the output can be in
                    > > codepages or in unicode. I think problems happened during encoding
                    > > conversion. Gvim hence appears to overcome these limitations. I use
                    > > gvim all the time and avoid vim. This this also the reason I am going
                    > > to change my system to linux as it has consistent encoding - utf8.
                    >
                    > > --
                    > > You received this message from the "vim_dev" maillist.
                    > > Do not top-post! Type your reply below the text you are replying to.
                    > > For more information, visithttp://www.vim.org/maillist.php
                    >
                    > --
                    > 阿弥陀佛

                    I encountered similar problems from time to time, not even only vim.
                    Simplified Chinese encoding in Windows is cp936. Conversion between
                    cp936 and utf-8 is lossy because utf-8 contains much more characters
                    than cp936. Errors happen during conversion between vim and
                    console(command prompt) and vim rejects invalid characters. A simple
                    testing is to create a file with filename in Eastern Europe, Japanese
                    or other languages in Window Explorer, and view that filename in
                    console. The filename would appears in garbbage even you have set the
                    correct font for the console. This happens in random and depends on
                    what characters you enter.

                    Gvim, on the other hand, uses Windows internal GUI (or API I don't
                    know) directly, and bypass console as a medium. Conversion between
                    gvim (utf-8) and GUI or API (unicode) is lossless. Therefore it works
                    correctly as long as utf-8 or unicode can handle.

                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php
                  Your message has been successfully submitted and would be delivered to recipients shortly.