From: Ross Bamford Date: 2006-12-07T11:55:13+09:00 Subject: Re: replace delimiter in unicode encdoded file On Wed, 06 Dec 2006 19:06:51 -0000, ciapecki wrote: > Another question following up. > Is there a way to find out in what encoding is the file encoded (is it > ucs-2le or utf-8)? > when I open a file in VIM I can check it with :set fileencoding > so there must be any way to recognize the file and its encoding. > I've not used it myself so I can't say it'll definitely do what you need, but NKF from the standard library might get you closer: http://ruby-doc.org/stdlib/libdoc/nkf/rdoc/index.html -- Ross Bamford - rosco@roscopeco.remove.co.uk