LINUX.ORG.RU

Re: Из cp1251 в UTF-8

find, xargs, iconv

anonymous ()

Re: Из cp1251 в UTF-8

создай скрипт

> echo 'cat $1 | iconv -f CP1251 -t UTF-8 >> /tmp/$$.cv && mv /tmp/$$.cv $1' > ~/cp1251_to_utf8.sh

сделай его исполняемым > chmod u+x ~/cp1251_to_utf8.sh

затем включай поиск по заданным параметрам и примени к результатам этот скрипт

>find /home/ -type f -iname \*.txt -exec ~/cp1251_to_utf8.sh {} \;

fMad ★★ ()

Re: Из cp1251 в UTF-8

enca -L ru -x utf-8 *.*

Neko ()

Re: Из cp1251 в UTF-8

$ apt-cache show convmv

Description: filename encoding conversion tool
 convmv can convert a single filename, a directory tree or all files
 on a filesystem to a different encoding. It only converts the
 encoding of filenames, not files contents. A special feature of
 convmv is that it also takes care of symlinks: the encoding of the
 symlink's target will be converted if the symlink itself is being
 converted.
 .
 It is also possible to convert directories to UTF-8 which are already
 partially UTF-8 encoded.

anonymous ()

Re: Из cp1251 в UTF-8

Спасибо всем =)

anonymous ()
Ответ на: Re: Из cp1251 в UTF-8 от anonymous

Re: Из cp1251 в UTF-8

>It only converts the encoding of filenames, not files contents

чукча не читатель, чукча писатель?

maloi ★★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.