[EMAIL PROTECTED] wrote:
Hello,

I now use vim 7 for DOS batching in WinXP.

If I use umlaut (äöüß) in vim 7, it is displayed correctly.
But vim 7 saves the buffer using the Windows Codepage, like gvim does!
The buffer content is the same when saved by gvim and vim.

So I cannot i.e. correctly display (echo) text with umlauts nor work with files/directories using umlauts ((of course I don't really))

Up to vim 7 vim behaved differently, saving the buffer using the DOS
Codepage.

What has changed now, or how can I workaround?

Joachim


VIM - Vi IMproved 7.0 (2006 May 7, compiled May  7 2006 16:18:30)
MS-Windows 32 bit console version
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/




Method I: In Vim, set your 'encoding' to the Dos codepage you want to use. However there are several such codepages. The most-used ones are 437 and 850. You might try something like:

        if ! (has("gui_running") || has("x11") || has("mac"))
                if &tenc == ""
                        let &tenc = &enc
                endif
                set enc=cp850 fencs=
                setg fenc=
        endif

Method II: Set your console to Windows-1252. It may require special actions at boot-time.

(untested): in the shell

        chcp 1252

Method III: Keep your 'encoding' as-is but set the 'fileencoding' to the Dos codepage

        if ! (has("gui_running") || has("x11") || has("mac"))
                setg fenc=cp850
                silent! set fencs-=latin1
                silent! set fencs-=default
                set fencs+=cp850
        endif

Method IV: For a single file only: use ++enc=cp850 (or ++enc=cp437) when reading and/or writing. This method can also be used in gvim.
See ":help ++opt"



Best regards,
Tony.
--
... Now you're ready for the actual shopping.  Your goal should be to
get it over with as quickly as possible, because the longer you stay in
the mall, the longer your children will have to listen to holiday songs
on the mall public-address system, and many of these songs can damage
children emotionally.  For example: "Frosty the Snowman" is about a
snowman who befriends some children, plays with them until they learn
to love him, then melts.  And "Rudolph the Red-Nosed Reindeer" is about
a young reindeer who, because of a physical deformity, is treated as an
outcast by the other reindeer.  Then along comes good, old Santa.  Does
he ignore the deformity?  Does he look past Rudolph's nose and respect
Rudolph for the sensitive reindeer he is underneath?  No.  Santa asks
Rudolph to guide his sleigh, as if Rudolph were nothing more than some
kind of headlight with legs and a tail.  So unless you want your
children exposed to this kind of insensitivity, you should shop
quickly.
                -- Dave Barry, "Christmas Shopping: A Survivor's Guide"

Reply via email to