Re: Encoding

2007-05-30 Thread A.J.Mechelynck
lowercase exotic characters in Croatian language). A single byte was used to store each of these characters. However, in version 7 two bytes are used to store each of them! I don't know how to fix this problem. The value of LANG variable is en_US.UTF-8 and encoding is not mentioned in my vimrc

Re: Encoding

2007-05-30 Thread Yeti
So for start, set up your locale environment properly. en_US.UTF-8 is English with UTF-8 encoding (that is Unicode) which is definitely different from Croatian with ISO 8859-2. If you prefer English messages and number formats, etc., as I do, set at least LC_CTYPE to fix the character set. > D

Encoding

2007-05-30 Thread Damir Zucic
characters in Croatian language). A single byte was used to store each of these characters. However, in version 7 two bytes are used to store each of them! I don't know how to fix this problem. The value of LANG variable is en_US.UTF-8 and encoding is not mentioned in my vimrc file. Decimal valu

Automatically select encoding based on certain characters present in the file

2007-05-16 Thread Szabolcs Horvát
I have fileencodings=ucs-bom,utf-8,latin1. But I would like to use latin2 instead of latin1 for files that contain the characters 0xf5 or 0xfb (ő and ű in latin2). I tried to modify the example that is given on the help page for 'fileencodings', like this: au BufReadPost * if &fenc == "latin1" &

Re: Encoding problem

2007-02-15 Thread A.J.Mechelynck
(in the Console version only) how the terminal displays it. By default it is set to empty, which means "use the value of 'encoding'". This is OK as long as you don't change 'encoding' in your vimrc. If you do, then it is "prudent" to save in 'te

Re: Encoding problem

2007-02-15 Thread A.J.Mechelynck
n only) how the terminal displays it. By default it is set to empty, which means "use the value of 'encoding'". This is OK as long as you don't change 'encoding' in your vimrc. If you do, then it is "prudent" to save in 'termencoding' yo

Re: Encoding problem

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

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

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-01-13 Thread DervishD
assumed that Vim was using the "isprint()" functions in ctype for that. > That option's default is OS-dependent, but apparently not > locale-dependent. ASCII characters from 0x20 (space) to 0x7E (tilde), > including all digits and letters, are always "printable&q

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 pag

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

Re: Encoding problem

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

Re: Encoding problem

2007-01-12 Thread A.J.Mechelynck
llowing lines at top, do ":setlocal fenc=latin1", and (IIUC) it will always be _read_ as Latin1 in the future, because of the accented letters in your name: Won't "scriptencoding" work? I have latin1 characters in my vimrc and setting "encoding=utf8" now c

Re: Encoding problem

2007-01-12 Thread DervishD
imrc, you could add the following lines > >>at top, do ":setlocal fenc=latin1", and (IIUC) it will always be _read_ > >>as Latin1 in the future, because of the accented letters in your name: > > > >Won't "scriptencoding" work? I have latin1

Re: Encoding problem

2007-01-11 Thread A.J.Mechelynck
UC) it will always be _read_ as Latin1 in the future, because of the accented letters in your name: Won't "scriptencoding" work? I have latin1 characters in my vimrc and setting "encoding=utf8" now causes vim to spill an error when reading it :((( I'm afraid I wil

Re: Encoding problem

2007-01-11 Thread DervishD
pting US-ASCII. Sorry, I'm afraid I didn't use the proper smiley O:) I wasn't frowning, what I wanted to express was more in the lines of "how unfortunate am I", or something like that. Sorry for the mistake... > >A partial solution for me would be to forc

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 fileen

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 e

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 f

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

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&

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: Auto-guessing file encoding and integration with Vim (works for Latin1, GBK, and Big5 now)

2006-10-14 Thread Benji Fisher
guages, viz. Traditional > Chinese, Japanese and Korean. IMHO it would be better as a script than as a > tip because it is easier to upload new versions of a script. Or maybe a > script to "do the job" and a tip explaining to Vim users, in pain language, > what to look for w

Re: Auto-guessing file encoding and integration with Vim (works for Latin1, GBK, and Big5 now)

2006-10-13 Thread A.J.Mechelynck
m users, in pain language, what to look for when trying to guess the encoding for CJK text files. Best regards, Tony.

Re: Auto-guessing file encoding and integration with Vim (works for Latin1, GBK, and Big5 now)

2006-10-13 Thread Yongwei Wu
Hi Benji, On 10/12/06, Benji Fisher <[EMAIL PROTECTED]> wrote: On Sat, Oct 07, 2006 at 12:37:33AM +0800, Yongwei Wu wrote: > This is a report of what I have already achieved. If you are dealing > with more encodings than the fileencodings option can handle, esp. if > you read and write Simplifie

Re: Auto-guessing file encoding and integration with Vim (works for Latin1, GBK, and Big5 now)

2006-10-12 Thread Benji Fisher
On Sat, Oct 07, 2006 at 12:37:33AM +0800, Yongwei Wu wrote: > This is a report of what I have already achieved. If you are dealing > with more encodings than the fileencodings option can handle, esp. if > you read and write Simplified and Traditional Chinese, please read on. I write English a

Auto-guessing file encoding and integration with Vim (works for Latin1, GBK, and Big5 now)

2006-10-06 Thread Yongwei Wu
This is a report of what I have already achieved. If you are dealing with more encodings than the fileencodings option can handle, esp. if you read and write Simplified and Traditional Chinese, please read on. First, you need to have some external program to guess the encoding of a text file

Re: Questions regarding auto-guessing the encoding

2006-10-03 Thread Yongwei Wu
On 10/3/06, Yegappan Lakshmanan <[EMAIL PROTECTED]> wrote: Hello, On 10/2/06, Yongwei Wu <[EMAIL PROTECTED]> wrote: > > * Is there a way to tell a user-defined command to have file name completion? > Yes. You can use the "-complete=file" option when defining the command. For example, Thanks.

Re: Questions regarding auto-guessing the encoding

2006-10-02 Thread Yegappan Lakshmanan
Hello, On 10/2/06, Yongwei Wu <[EMAIL PROTECTED]> wrote: * Is there a way to tell a user-defined command to have file name completion? Yes. You can use the "-complete=file" option when defining the command. For example, command -nargs=1 -complete=file EditFile edit For additional suppor

Re: Questions regarding auto-guessing the encoding

2006-10-02 Thread Yongwei Wu
On 10/3/06, Yongwei Wu <[EMAIL PROTECTED]> wrote: * Why keymap/accents.vim is opened as UTF-8 and fails the conversion when fencs=ucs-bom,utf-8,cp936? (It is opened as Latin1 when fencs=ucs-bom,utf-8,latin1, and this inconsistency is a little annoying to me to determine in a handler whether the f

Questions regarding auto-guessing the encoding

2006-10-02 Thread Yongwei Wu
Hi Bram and Vim gurus, I wrote a little program to guess the encoding of a text file, and I intend to use it with vim. (So it currently supports ASCII, Latin1, GB2312, GBK, and Big5 files, but no UTF-x, since it might not be necessary.) While trying to make it work together, I encountered some

Re: utf-8 encoding without BOM

2006-08-31 Thread Stefan Walk
the interpreter executes code between , and doesn't output it's content, but outputs everything else in the file. The BOM marks are located *before* the Also, if you are using multiple PHP files that include each other, a BOM will be sent for every PHP file you are including, which will return i

Re: utf-8 encoding without BOM

2006-08-31 Thread Péter Zsoldos
A.J.Mechelynck wrote: it may be that the "headers" you talk about must be in 7-bit US-ASCII: in that case it might be simplest to edit the headers as a separate file with These headers I talk about are HTTP headers, and according to protocol, they should be sent out to the client *before* any c

Re: utf-8 encoding without BOM

2006-08-31 Thread Péter Zsoldos
Yakov Lerner wrote: :e ++enc=utf-8 file Thanks, it seems to work. Peter

Re: utf-8 encoding without BOM

2006-08-31 Thread A.J.Mechelynck
Péter Zsoldos wrote: Greetings, I'm using gVim 6.3 on Windows Xp Sp2 and I ran into a problem that I need to edit files with UTF-8 encoding, but I just can't get VIM to do so. If I create utf-8 encoded files in notepad, VIM accepts this, but places the BOM into the file. This BOM c

Re: utf-8 encoding without BOM

2006-08-31 Thread Yakov Lerner
On 8/31/06, Péter Zsoldos <[EMAIL PROTECTED]> wrote: Greetings, I'm using gVim 6.3 on Windows Xp Sp2 and I ran into a problem that I need to edit files with UTF-8 encoding, but I just can't get VIM to do so. If I create utf-8 encoded files in notepad, VIM accepts this, but pla

utf-8 encoding without BOM

2006-08-31 Thread Péter Zsoldos
Greetings, I'm using gVim 6.3 on Windows Xp Sp2 and I ran into a problem that I need to edit files with UTF-8 encoding, but I just can't get VIM to do so. If I create utf-8 encoded files in notepad, VIM accepts this, but places the BOM into the file. This BOM causes me a lot o

Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-11 Thread Yakov Lerner
On 8/12/06, mwoehlke <[EMAIL PROTECTED]> wrote: Bram Moolenaar wrote: > hundred-and-one symptoms of being an internet addict: > 256. You are able to write down over 250 symptoms of being an internet > addict, even though they only asked for 101. So where is the complete list? ;-) I believ

RE: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-11 Thread Bram Moolenaar
> Bram, you have an overflow in your signature :) > > -- > > hundred-and-one symptoms of being an internet addict: > > 102. When filling out your driver's license application, you give > > your IP address. hundred-and-one symptoms of being an internet addict: 256. You are able to write down

Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-10 Thread Jürgen Krämer
med characters in menu and > toolbar >> when using zh_CN.GBK encoding under Linux >> >> >> >> -- >> hundred-and-one symptoms of being an internet addict: >> 102. When filling out your driver's license application, you give >> your IP address.

RE: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-10 Thread Max Dyckhoff
Bram, you have an overflow in your signature :) Max > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 10, 2006 1:44 PM > Subject: Re: Patch (Unofficial): Malformed characters in menu and toolbar > when using zh_CN.GBK encod

Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-10 Thread Bram Moolenaar
Edward L. Fox wrote: > Patch Unofficial > Problem:Menu and toolbar: Doesn't display properly when using > zh_CN.GBK encoding under Linux. > Solution: Use gb2312 to generate the menu and toolbar to get proper > display, then use cp936 instead of GBK which is a correct

Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-10 Thread Edward L. Fox
Patch Unofficial Problem:Menu and toolbar: Doesn't display properly when using zh_CN.GBK encoding under Linux. Solution: Use gb2312 to generate the menu and toolbar to get proper display, then use cp936 instead of GBK which is a correct alias under Linux. Files: runtime/men

Re: Antialiased font and encoding on Mac OS X

2006-07-18 Thread Wojciech Grzemski
problem writing or reading files >> containing Polish letters. With the above snipped I tried to set >> encoding and termencoding variables to latin-2, utf-8 but to no avail; >> "antialias" is set in both cases. > > > Not all fonts have the same set of glyphs.

Re: Antialiased font and encoding on Mac OS X

2006-07-15 Thread A.J.Mechelynck
t (Monaco) but cannot see properly (nor write) Polish diacritics. If I comment out the above lines I don't have antialiased font, but have no problem writing or reading files containing Polish letters. With the above snipped I tried to set encoding and termencoding variables to latin-2, ut

Antialiased font and encoding on Mac OS X

2006-07-09 Thread Wojciech Grzemski
rly (nor write) Polish diacritics. If I comment out the above lines I don't have antialiased font, but have no problem writing or reading files containing Polish letters. With the above snipped I tried to set encoding and termencoding variables to latin-2, utf-8 but to no avail; "antiali

RE: Irritating column numbers with encoding=utf-8

2006-07-05 Thread Zdenek Sekera
> -Original Message- > From: Jürgen Krämer [mailto:[EMAIL PROTECTED] > Sent: 06 July 2006 08:01 > To: vim mailing list > Subject: Re: Irritating column numbers with encoding=utf-8 > > > Hi, > > Bram Moolenaar wrote: > > > > Jürgen Krämer wro

Re: Irritating column numbers with encoding=utf-8

2006-07-05 Thread Jürgen Krämer
Hi, Bram Moolenaar wrote: > > Jürgen Krämer wrote: > >> with 'encoding' set to "utf-8" there is a quite confusing (to me) >> difference between the column number and my expectations (supported by >> the virtual column number) if there are non-ASC

Re: Irritating column numbers with encoding=utf-8

2006-07-05 Thread Bram Moolenaar
Jürgen Krämer wrote: > with 'encoding' set to "utf-8" there is a quite confusing (to me) > difference between the column number and my expectations (supported by > the virtual column number) if there are non-ASCII characters on the > line. I don't know what

Re: Irritating column numbers with encoding=utf-8

2006-07-05 Thread Yakov Lerner
On 7/5/06, Jürgen Krämer <[EMAIL PROTECTED]> wrote: with 'encoding' set to "utf-8" there is a quite confusing (to me) difference between the column number and my expectations (supported by the virtual column number) if there are non-ASCII characters on the line. And a

Re: Irritating column numbers with encoding=utf-8

2006-07-05 Thread Yakov Lerner
On 7/5/06, Jürgen Krämer <[EMAIL PROTECTED]> wrote: To work around the problem in this example is not that hard -- I can use /\%...v instead. Yes The example in my original mail poses a bigger problem (to me) -- I'd like to switch to "encoding=utf-8" as default, but I of

Re: Irritating column numbers with encoding=utf-8

2006-07-05 Thread Jürgen Krämer
Hi, James Vega wrote: > > On Wed, Jul 05, 2006 at 11:50:51AM +0200, Jürgen Krämer wrote: >> >> with 'encoding' set to "utf-8" there is a quite confusing (to me) >> difference between the column number and my expectations (supported by >>

Re: Irritating column numbers with encoding=utf-8

2006-07-05 Thread James Vega
On Wed, Jul 05, 2006 at 11:50:51AM +0200, Jürgen Krämer wrote: > > Hi, > > with 'encoding' set to "utf-8" there is a quite confusing (to me) > difference between the column number and my expectations (supported by > the virtual column number) if there

Irritating column numbers with encoding=utf-8

2006-07-05 Thread Jürgen Krämer
Hi, with 'encoding' set to "utf-8" there is a quite confusing (to me) difference between the column number and my expectations (supported by the virtual column number) if there are non-ASCII characters on the line. I don't know what the intended meaning of "

Re: URL-Encoding

2006-06-14 Thread Thomas
Johannes Schwarz wrote: Is there a builtin url-encoding function available in vim? Or has s.o. wrote a script already? Do you mean something like this (based on code from eval.txt): fun! EncodeChar(char) if a:char == '%' return '%%' elseif a:char =

URL-Encoding

2006-06-14 Thread Johannes Schwarz
Is there a builtin url-encoding function available in vim? Or has s.o. wrote a script already? thanx Joe WIKA Alexander Wiegand GmbH & Co. KG Johannes Schwarz International Consulting & E-Commerce phone:+49

Re: Encoding problem - Ubuntu 5.10 & Vim 7.0

2006-05-16 Thread victor NOAGBODJI
I don't know what file to edit to get ISO-8859-1 automatically. When editing a file, I would do :set fenc=latin1 or :set enc=latin1. Sometimes it does work, sometimes it doesn't. I want something that set my encoding at start, or better according to what characters I'm entering. Help me please.

Re: Input using meta key under different encoding

2006-04-28 Thread Yakov Lerner
t of insert mode and put the cursor >> on the character and use "ga" to see what it is I get but if I do >> the same thing when the encoding is "cp437" I get . >> > > For me, the sequence i ctrl-v alt-nga results > in exactly same thing: > <î

Re: Input using meta key under different encoding

2006-04-26 Thread Dave Roberts
is I get but if I do the same thing when the encoding is "cp437" I get . For me, the sequence i ctrl-v alt-nga results in exactly same thing: <î> <|n>238, Hex ee, Octal 356 This is vim7.0f I used command :set encoding=8bit-cp437 to change encoding.

Re: Input using meta key under different encoding

2006-04-25 Thread Yakov Lerner
t but if I do > the same thing when the encoding is "cp437" I get . For me, the sequence i ctrl-v alt-nga results in exactly same thing: <î> <|n>238, Hex ee, Octal 356 This is vim7.0f I used command :set encoding=8bit-cp437 to change encoding. Some useful inf

Input using meta key under different encoding

2006-04-25 Thread Dave Roberts
key habits with whatever so I could switch to terminals as necessary and continue to work. The one set of keys I still use all the time is Alt-n and Alt-p for next and previous buffers. I also sometimes edit old C programs that had "ASCII graphics" in the comments to create boxes etc.