[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    Re: Vim 6.3 bug: incorrect handling of utf-8 in files
From:       "Antoine J. Mechelynck" <antoine.mechelynck () belgacom ! net>
Date:       2005-02-16 7:46:30
Message-ID: 4212FA56.306 () belgacom ! net
[Download RAW message or body]

vassily ragosin wrote:
> Hello Antoine,
> 
> 
>>I you set 'encoding' to UTF-8 (and 'termencoding' to your 
>>keyboard's charset and _not_ to empty) 
> 
> 
> Wow! :) What is the reason for having an empty 'termencoding' as a default?
> 
> resourcefully yours,
> vassily
> 
> mailto:vr[at]vrgraphics.ru
> pgp key id 0x92B4A97C

'termencoding' empty means use the same value as 'encoding'. At program 
startup, before sourcing your vimrc, 'encoding' is set according to your 
locale; IOW, its default value is not hardcoded but depends on your OS's 
language settings. Defaulting 'termencoding' to empty is OK as long as 
you don't modify 'encoding'. If you do, setting 'termencoding' to 
whatever 'encoding' was originally set to is usually enough, as follows:

	if &tenc == ""
		let &tenc = &enc
	endif
	set enc=utf-8

Best regards,
Tony.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic