From: Paul Lutus Date: 2006-12-07T08:35:05+09:00 Subject: Re: replace delimiter in unicode encdoded file ciapecki wrote: / ... > in VIM :set filencoding (does not only set fileencoding, but as well > shows current fileencoding when run like I wrote) > so when I open a utf-8 file and enter :set fileencoding I get utf8, > when I open a ucs-2le file I get ucs-2le, I do not know how it > recognizes, > but the same thing happens (but not always) in Microsoft Notepad. When > you mark a file which is in UTF-8 Notepad marks UTF-8 as encoding, when > the file is ucs-2le, it marks Unicode as encoding. > So there must be something characteristic in those files. In a case like that and AFAIK, there is a header present for the unicode case, and the editor defaults to utf-8 in the absence of a header. If this were not true, the program would not be able to distinguish between valid utf-8 and the content of a unicode file read one byte at a time. -- Paul Lutus http://www.arachnoid.com