I have a bit of a problem with encoding. A particular file (made in windows
btw) shows characters wrong in vim, but ok in gvim. Example:
¹²³â¬
(made by holding alt-gr key and typing 1234).
Gvim shows encoding as utf-8 as does vim, so I thought maybe it was a
problem with my terminal (mrxvt)
SOLVED!
Well I think I fixed by rtfm:
:set termenc=cp1252
Seems to work, but I don't know yet whether it breaks anything else.
On (15:20 15/02/07), David Woodfall [EMAIL PROTECTED] put forth the
proposition:
I have a bit of a problem with encoding. A particular file (made in windows
btw)
David Woodfall wrote:
SOLVED!
Well I think I fixed by rtfm:
:set termenc=cp1252
Seems to work, but I don't know yet whether it breaks anything else.
'termencoding' tells Vim (in both the Console and GUI versions) how your
keyboard translates data and (in the Console version only) how the
A.J.Mechelynck wrote:
David Woodfall wrote:
SOLVED!
Well I think I fixed by rtfm:
:set termenc=cp1252
Seems to work, but I don't know yet whether it breaks anything else.
'termencoding' tells Vim (in both the Console and GUI versions) how your
keyboard translates data and (in the Console
Hi Tony :)
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
:scriptencoding applies no farther than the end of the current script.
And does it affect sourced scripts or should I put that line in all
scripts?
It doesn't affect sourced scripts. Each script should include or not
include
Hi Tony :)
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
DervishD wrote:
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
[...]
As long as your vimrc includes only 7-bit ASCII, there's no problem. But
in the particular case of your vimrc, you could add the following lines
at top, do :setlocal
DervishD wrote:
Hi Tony :)
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
DervishD wrote:
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
[...]
As long as your vimrc includes only 7-bit ASCII, there's no problem. But
in the particular case of your vimrc, you could add the following lines
at top,
DervishD wrote:
Hi Tony :)
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
DervishD wrote:
:scriptencoding is used to tell Vim's sourcing engine in which
'fileencoding' the script was written. There are two cases where it is
not necessary:
- the same as 'encoding', or
- UTF-8 with BOM.
IOW,
A.J.Mechelynck wrote:
[...]
If you leave 'encoding' set at Latin1, Vim won't be able to represent in
memory any Unicode codepoints higher than U+00FF, even if you use :e
++enc=utf-8 filename. See for instance the Russian and Arabic text in
my front page,
Hi Scot :)
* Scot Becker [EMAIL PROTECTED] dixit:
Try removing both the
set encoding and
set fileencoding lines.
And see if it does what you want.
It should do latin1 still by default (based on your system settings),
and still let you see utf files. If that fails, leave the 'set
Hi Tony :)
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
DervishD wrote:
My system is latin-1, so I want my files written using latin-1
encoding. But sometimes I get files in utf8 encoding, so I set up my vim
like this:
set encoding =latin1
set fileencoding =latin1
set
DervishD wrote:
Hi Tony :)
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
DervishD wrote:
My system is latin-1, so I want my files written using latin-1
encoding. But sometimes I get files in utf8 encoding, so I set up my vim
like this:
set encoding =latin1
set fileencoding =latin1
Hi Tony :)
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
Your problem lies in the relation between UTF-8, Latin1 and US-ASCII.
Characters 0x00 to 0x7F are represented identically in all three,
therefore if a file contains only 7-bit ASCII characters, it won't make
any difference whether
DervishD wrote:
Hi Tony :)
* A.J.Mechelynck [EMAIL PROTECTED] dixit:
[...]
As long as your vimrc includes only 7-bit ASCII, there's no problem. But in
the particular case of your vimrc, you could add the following lines at
top, do :setlocal fenc=latin1, and (IIUC) it will always be
Hi all :)
My system is latin-1, so I want my files written using latin-1
encoding. But sometimes I get files in utf8 encoding, so I set up my vim
like this:
set encoding =latin1
set fileencoding =latin1
set fileencodings =ucs-bom,utf-8,latin1
This last line is causing
Try removing both the
set encoding and
set fileencoding lines.
And see if it does what you want.
It should do latin1 still by default (based on your system settings),
and still let you see utf files. If that fails, leave the 'set
encoding', but leave out the 'set fileencoding'. I think that
DervishD wrote:
Hi all :)
My system is latin-1, so I want my files written using latin-1
encoding. But sometimes I get files in utf8 encoding, so I set up my vim
like this:
set encoding =latin1
set fileencoding =latin1
set fileencodings =ucs-bom,utf-8,latin1
This last
17 matches
Mail list logo