Encoding problem

2007-02-15 Thread David Woodfall
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)

Re: Encoding problem

2007-02-15 Thread David Woodfall
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)

Re: Encoding problem

2007-02-15 Thread A.J.Mechelynck
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

Re: Encoding problem

2007-02-15 Thread A.J.Mechelynck
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

Re: Encoding problem

2007-01-13 Thread DervishD
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

Re: Encoding problem

2007-01-12 Thread DervishD
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

Re: Encoding problem

2007-01-12 Thread A.J.Mechelynck
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,

Re: Encoding problem

2007-01-12 Thread A.J.Mechelynck
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,

Re: Encoding problem

2007-01-12 Thread A.J.Mechelynck
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,

Re: Encoding problem

2007-01-11 Thread DervishD
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

Re: Encoding problem

2007-01-11 Thread DervishD
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

Re: Encoding problem

2007-01-11 Thread A.J.Mechelynck
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

Re: Encoding problem

2007-01-11 Thread DervishD
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

Re: Encoding problem

2007-01-11 Thread A.J.Mechelynck
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

Encoding problem

2007-01-10 Thread DervishD
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

Re: Encoding problem

2007-01-10 Thread Scot Becker
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

Re: Encoding problem

2007-01-10 Thread A.J.Mechelynck
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