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

ANSI<>UNICODE and reverse

Expand Messages
  • wintec
    Hi all! I need to perform ANSI/UNICODE commands in my GVIM. I read many docs on the web about and I did set these: ------------------------------------------
    Message 1 of 3 , Nov 5, 2009
    • 0 Attachment
      Hi all!
      I need to perform ANSI/UNICODE commands in my GVIM.
      I read many docs on the web about and I did set these:

      "------------------------------------------
      " .vimrc includes
      "----------------------
      :set ffs=dos,unix,mac " autosense Dos,Unix,Mac
      :set fileencodings=ucs-bom,utf-8,latin1 " autosense coding
      " (no fileencoding is set in .vimrc)

      "------------------------------------------
      " my menu includes
      "----------------------

      :set fileencoding=latin1<CR><Esc>:set ff=dos<CR>:w!<CR> " ANSI Dos
      :set fileencoding=utf-8<CR>:w!<CR><Esc> " UNICODE

      "-------------------------------------------

      but they don't work correctly (I check the files with an
      other editor)...

      1) I open an ANSI file with GVim, I ask ":set fileencoding"
      and the file appears as "utf-8"

      2) conversion between ANSI <> UNICODE and then reverse likes
      right ("converted" in bottom status line), but refreshing
      the file on the other editor I see the same coding...

      Does anybody can help, pls?


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • winterTTr
      ... What s the value for the option encoding ? if the encoding is set to utf-8 when you don t set fenc , the file will open with the same encoding as
      Message 2 of 3 , Nov 5, 2009
      • 0 Attachment
        On Thu, Nov 5, 2009 at 7:56 PM, Paolo Baruffa <wintec@...> wrote:

        Hi all!
        I need to perform ANSI/UNICODE commands in my GVIM.
        I read many docs on the web about and I did set these:

        "------------------------------------------
        "       .vimrc  includes
        "----------------------
        :set ffs=dos,unix,mac   "       autosense Dos,Unix,Mac
        :set fileencodings=ucs-bom,utf-8,latin1 "       autosense coding
        " (no fileencoding is set in .vimrc)

        "------------------------------------------
        "       my menu includes
        "----------------------

        :set fileencoding=latin1<CR><Esc>:set ff=dos<CR>:w!<CR> " ANSI Dos
        :set fileencoding=utf-8<CR>:w!<CR><Esc> " UNICODE

        "-------------------------------------------

        but they don't work correctly (I check the files with an
        other editor)...

        1) I open an ANSI file with GVim, I ask ":set fileencoding"
        and the file appears as "utf-8"

        What's the value for the option "encoding" ?
        if the "encoding" is set to utf-8 when you don't set "fenc" , the file 
        will open with the same encoding as what you set to enc , which should 
        become 'utf8'
         

        2) conversion between ANSI <> UNICODE and then reverse likes
        right ("converted" in bottom status line), but refreshing
        the file on the other editor I see the same coding...

        What do you mean for the "The same coding "?
        The coding is always ANSI or UNICODE?

        And before this , there is something should be mentioned.
        UTF-8 is a variable-length character encoding for UNICODE , and 
        if you original file is ansi encoding ,  when it is convert to utf8 ( without BOM),
        the file should be same ( seems like no convert ). Because utf8 uses the single
        octet encoding only for the 128 US-ASCII characters  which is the same as
        when it is encoding with ansi.
         

        Does anybody can help, pls?





        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_multibyte" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---

      • John Beckett
        ... See discussion in vim_use http://groups.google.com/group/vim_use/browse_thread/thread/cc7e9076fa7d277d John
        Message 3 of 3 , Nov 5, 2009
        • 0 Attachment
          Paolo wrote:
          > I need to perform ANSI/UNICODE commands in my GVIM.

          See discussion in vim_use
          http://groups.google.com/group/vim_use/browse_thread/thread/cc7e9076fa7d277d

          John


          --~--~---------~--~----~------------~-------~--~----~
          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.