Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-28 Thread Benjamin Fritz
On Thu, Jan 27, 2011 at 10:43 PM, Chris Jones cjns1...@gmail.com wrote: On Sat, Jan 22, 2011 at 05:41:33PM EST, Ben Fritz wrote: [..] I work in Windows XP mostly, I actually have never heard of xkb and don't have the slightest idea what it's level 3 is. Converting to UTF-8 for this

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-28 Thread Chris Jones
On Fri, Jan 28, 2011 at 11:15:18AM EST, Benjamin Fritz wrote: On Thu, Jan 27, 2011 at 10:43 PM, Chris Jones cjns1...@gmail.com wrote: [..] Maybe you should set your locale to latin1 instead of UTF-8 and the encoding to cp1251? Latin1 has no representation for various characters which I

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-27 Thread Chris Jones
On Sat, Jan 22, 2011 at 05:41:33PM EST, Ben Fritz wrote: [..] I work in Windows XP mostly, I actually have never heard of xkb and don't have the slightest idea what it's level 3 is. Converting to UTF-8 for this particular file would be OK but doesn't serve much purpose, and most of the files

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-23 Thread Benjamin Fritz
On Sat, Jan 22, 2011 at 7:16 PM, Chris Jones cjns1...@gmail.com wrote: So, is there a command to show the byte value of the character under the cursor, as it will be written? If I need to I can convert to binary but I'd rather just do something like 'ga'. Not sure what you want, but take a

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-23 Thread Benjamin Fritz
On Sat, Jan 22, 2011 at 5:37 PM, Ben Schmidt mail_ben_schm...@yahoo.com.au wrote: On 23/01/11 9:41 AM, Ben Fritz wrote: I somehow have the impression that changing encoding while Vim was already up and running is a bad idea. I don't really know *what* it could mess up. Anyone? Changing

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-23 Thread Ben Schmidt
On 24/01/11 3:54 AM, Benjamin Fritz wrote: On Sat, Jan 22, 2011 at 5:37 PM, Ben Schmidt mail_ben_schm...@yahoo.com.au wrote: On 23/01/11 9:41 AM, Ben Fritz wrote: I somehow have the impression that changing encoding while Vim was already up and running is a bad idea. I don't really know

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-22 Thread Ben Schmidt
On 22/01/11 5:37 AM, Ben Fritz wrote: I have a file encoded as cp1252. I have my encoding set to utf-8, and my fileencodings set up such that when this file is read in, it gets an fenc of cp1252 and is read in properly. In this file is an en dash, encoded as byte value 150. The Unicode value

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-22 Thread sergio
On 01/21/2011 09:37 PM, Ben Fritz wrote: When fileencoding and encoding are different, vim converts file content from fileencoding to encoding on read and vice versa on write. So you actually work with utf8 characters. If you want to work with cp1251, you need to change encoding (and fonts,

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-22 Thread Ben Fritz
On Jan 22, 3:48 am, Ben Schmidt mail_ben_schm...@yahoo.com.au wrote: I think so. :help 'fileencoding' describes conversion as taking place when files are written and read, implying that when a file is actually being edited, it is in 'encoding', and commands within Vim working on the file

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-22 Thread Ben Fritz
On Jan 22, 9:43 am, sergio mail...@sergio.spb.ru wrote: On 01/21/2011 09:37 PM, Ben Fritz wrote: When fileencoding and encoding are different, vim converts file content from fileencoding to encoding on read and vice versa on write. So you actually work with utf8 characters. If you want to

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-22 Thread Ben Schmidt
On 23/01/11 9:34 AM, Ben Fritz wrote: On Jan 22, 3:48 am, Ben Schmidtmail_ben_schm...@yahoo.com.au wrote: I think so. :help 'fileencoding' describes conversion as taking place when files are written and read, implying that when a file is actually being edited, it is in 'encoding', and

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-22 Thread Ben Schmidt
On 23/01/11 9:41 AM, Ben Fritz wrote: On Jan 22, 9:43 am, sergiomail...@sergio.spb.ru wrote: On 01/21/2011 09:37 PM, Ben Fritz wrote: When fileencoding and encoding are different, vim converts file content from fileencoding to encoding on read and vice versa on write. So you actually work

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-22 Thread sergio
On 01/23/2011 01:41 AM, Ben Fritz wrote: I somehow have the impression that changing encoding while Vim was already up and running is a bad idea. Why? It should not matter at all. But in a simple text file there will not be any translating later. The particular file I was working with when I

Re: cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-22 Thread Chris Jones
On Sat, Jan 22, 2011 at 05:34:01PM EST, Ben Fritz wrote: On Jan 22, 3:48 am, Ben Schmidt mail_ben_schm...@yahoo.com.au wrote: I think so. :help 'fileencoding' describes conversion as taking place when files are written and read, implying that when a file is actually being edited, it

cp1252 characters when enc=utf-8, fenc=cp1252

2011-01-21 Thread Ben Fritz
I have a file encoded as cp1252. I have my encoding set to utf-8, and my fileencodings set up such that when this file is read in, it gets an fenc of cp1252 and is read in properly. In this file is an en dash, encoded as byte value 150. The Unicode value for this is 8211. I would expect that