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

multibyte charaters can not be displayed in silent ex mode

Expand Messages
  • sola
    I tried the following command with some Chinese characters in file kk.txt. vim --noplugin -es kk.txt + set encoding=utf-8 + set tenc=cp950 + set
    Message 1 of 4 , Mar 17, 2008
    • 0 Attachment
      I tried the following command with some Chinese characters in file
      kk.txt.

      vim --noplugin -es kk.txt +"set encoding=utf-8" +"set tenc=cp950"
      +"set fileencoding=ucs-2le" +print +q!

      It does not work,only gibberish characters are displayed.

      Without using silent mode , the characters are displayed correctly.

      vim --noplugin -e kk.txt +"set encoding=utf-8" +"set tenc=cp950"
      +"set fileencoding=ucs-2le" +print

      I am using vim7 on windows.
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Bram Moolenaar
      ... Check the help for the -s option: :help -s-ex Perhaps it s something in your vimrc that matters. Try using -u NONE to both commands. Setting
      Message 2 of 4 , Mar 17, 2008
      • 0 Attachment
        Sola wrote:

        > I tried the following command with some Chinese characters in file
        > kk.txt.
        >
        > vim --noplugin -es kk.txt +"set encoding=utf-8" +"set tenc=cp950"
        > +"set fileencoding=ucs-2le" +print +q!
        >
        > It does not work,only gibberish characters are displayed.
        >
        > Without using silent mode , the characters are displayed correctly.
        >
        > vim --noplugin -e kk.txt +"set encoding=utf-8" +"set tenc=cp950"
        > +"set fileencoding=ucs-2le" +print
        >
        > I am using vim7 on windows.

        Check the help for the -s option: :help -s-ex

        Perhaps it's something in your vimrc that matters. Try using "-u NONE"
        to both commands.

        Setting 'fileencoding' before loading a file has no effect. Try setting
        'fileencodings'.

        --
        Drink wet cement and get really stoned.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_multibyte" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • sola
        ... I tried with different termencoding,it has no effect on the output at all. I tried with different encoding,it only works when encoding is same as the
        Message 3 of 4 , Mar 17, 2008
        • 0 Attachment
          > Perhaps it's something in your vimrc that matters. Try using "-u NONE"
          > to both commands.
          >
          > Setting 'fileencoding' before loading a file has no effect. Try setting
          > 'fileencodings'.


          I tried with different termencoding,it has no effect on the output at
          all.
          I tried with different encoding,it only works when encoding is same as
          the codepage in using or ucs-2le

          vim --noplugin -es -u NONE +"set enc=cp950" +"set tenc=cp950" +"set
          fencs=ucs-2le" kk.txt +print +q!
          vim --noplugin -es -u NONE +"set enc=ucs2-le" +"set tenc=cp950"
          +"set fencs=ucs-2le" kk.txt +print +q!
          These works,

          vim --noplugin -es -u NONE +"set enc=utf-8" +"set tenc=cp950" +"set
          fencs=ucs-2le" +kk.txt +print +q!
          but not this.


          That means termencoding has no effect in silent ex mode?
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_multibyte" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • sola
          ... typo error: It should be ucs-2le but not ucs2-le so this dont work too. --~--~---------~--~----~------------~-------~--~----~ You received this message
          Message 4 of 4 , Mar 17, 2008
          • 0 Attachment
            > vim --noplugin -es -u NONE +"set enc=ucs2-le" +"set tenc=cp950" kk.txt +print +q!


            typo error:
            It should be "ucs-2le" but not "ucs2-le"
            so this dont work too.


            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_multibyte" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.