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

2635Re: ANSI<>UNICODE and reverse

Expand Messages
  • winterTTr
    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

    • Show all 3 messages in this topic