On Fri, Jan 28, 2011 at 2:14 PM, James Vega <[email protected]> wrote:
>
> I remember trying to reproduce your described behavior when I first saw
> your mail but wasn't able to.  Could you give a minimal set of steps
> along with the output that you're seeing for ":set enc? fenc? fencs?" in
> each of the different cases?
>

Running on Windows XP with the latest "cream without Vim" build (7.3.107 Huge).

gvim -N -u NONE -i NONE
:set enc=cp1252
:set enc? fenc? fencs?
  encoding=cp1252
  fileencoding=
  fileencodings=ucs-bom
:set guifont=* (and select a font with a glyph for an en dash, in my
case Deja Vu Sans Mono)
i<C-K>-N<Esc>
:saveas test.txt | q

gvim -N -u NONE -i NONE
:e test.txt
:set enc? fenc? fencs?
  encoding=latin1
  fileencoding=
  fileencodings=ucs-bom
:set guifont=* (and select a font with a glyph for an en dash, in my
case Deja Vu Sans Mono)
(here I see a single en dash character, even though latin1 does not
have this character)
:q

gvim -N -u NONE -i NONE
:set enc=utf-8
:set enc? fenc? fencs?
  encoding=utf-8
  fileencoding=
  fileencodings=ucs-bom,utf-8,default,latin1
:e test.txt
:set guifont=*  (and select a font with a glyph for an en dash, in my
case Deja Vu Sans Mono)
("converted" message displayed, buffer displayes a "bad char" blank
box as I would expect)
:set enc? fenc? fencs?
  encoding=utf-8
  fileencoding=latin1
  fileencodings=ucs-bom,utf-8,default,latin1
:e ++enc=cp1252
("converted" message displayed, buffer displays an en dash, as expected)
:set enc? fenc? fencs?
  encoding=utf-8
  fileencoding=cp1252
  fileencodings=ucs-bom,utf-8,default,latin1
:q

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

Raspunde prin e-mail lui