четверг, 31 июля 2014 г.

Determine and change file character encoding

file -bi [filename]

Example output:

steph@localhost ~ $ file -bi test.txt text/plain; charset=us-ascii 
  
Use vim to change a file's encoding:

set encoding=utf-8
set fileencoding=utf-8

Комментариев нет: