Отправляет email-рассылки с помощью сервиса Sendsay

Перекодировка

Добрые сутки, все.

Подскажите что-нить для перекодировки текстовых файлов (к примеру из cp1251
в KOI8-R).

Леший.

-*Информационный канал Subscribe.Ru
Написать в лист: mailto:comp.soft.linux.discuss-list@subscribe.ru
Отписаться: http://subscribe.ru/member/unsub?grp=comp.soft.linux.discuss&email=
http://subscribe.ru/ mailto:ask@subscribe.ru

Ответить   Sun, 23 Nov 2003 21:54:07 +0300 (#24816)

 

Ответы:

On Sun, 23 Nov 2003 21:54:07 +0300, <my_temp_ema***@h*****.ru> wrote:

iconv -f=cp1251 -t=koi8-r file.txt

Ответить   Mon, 24 Nov 2003 21:18:04 +0200 (#24923)

 

Уважаемый my_temp_ema***@h*****.ru!!!

Sunday, November 23, 2003, 9:54:07 PM, you wrote:

Сначала попробуйте команду iconv -l
а потом следуйте совету, никсоида, т.к. название кодировки может быть
не маленькими а большими буквами, последний абзац мана.

ICONV(1) Linux Programmer's Manual ICONV(1)

NAME
iconv - character set conversion

SYNOPSIS
iconv [-c] [-s] [-f encoding] [-t encoding] [inputfile ...]
iconv -l

DESCRIPTION
The iconv program converts text from one encoding to
another encoding. More precisely, it converts from the
encoding given for the -f option to the encoding given for
the -t option. Either of these encodings defaults to the
encoding of the current locale. All the inputfiles are
read and converted in turn; if no inputfile is given, the
standard input is used. The converted text is printed to
standard output.

When option -c is given, characters that cannot be con-
verted are silently discarded, instead of leading to a
conversion error.

When option -s is given, error messages about invalid or
unconvertible characters are omitted, but the actual con-
verted text is unaffected.

The encodings permitted are system dependent. For the
libiconv implementation, they are listed in the
iconv_open(3) manual page.

The iconv -l command lists the names of the supported
encodings, in a system dependent format. For the libiconv
implementation, the names are printed in upper case, sepa-
rated by whitespace, and alias names of an encoding are
listed on the same line as the encoding itself.

SEE ALSO
iconv_open(3), locale(7)

GNU January 13, 2002 ICONV(1)

--

С Уважением,

Сергей.

-*Информационный канал Subscribe.Ru
Написать в лист: mailto:comp.soft.linux.discuss-list@subscribe.ru
Отписаться: http://subscribe.ru/member/unsub?grp=comp.soft.linux.discuss&email=
http://subscribe.ru/ mailto:ask@subscribe.ru

Ответить   Sergey Tamkovich Tue, 25 Nov 2003 02:25:16 +0300 (#24944)

 

On Tue, 25 Nov 2003 02:25:16 +0300, Sergey Tamkovich <se***@m*****.ru>
wrote:

Там я немного не правильно сказал.
iconv -f cp1251 -t koi8-r file.txt -o out.txt
Вот этот скрипт я использовал для перекодировки сайта из koi8-r в cp1251:
(запускать из каталога с сайтом)
#!/bin/sh
for i in `find -print`; do
if ! [ -d $i ]; then
iconv -f koi8-r -t cp1251 $i -o $i.tmp
chmod --reference=$i $i.tmp
mv $i.tmp $i
fi
done
for i in `find -name *.tmp`; do
echo $i
rm -f $i
done

Ответить   Tue, 25 Nov 2003 07:38:33 +0200 (#25360)

 

iconv -fcp1251 -tkoi8-r myfile.txt > myfile.koi

-*Информационный канал Subscribe.Ru
Написать в лист: mailto:comp.soft.linux.discuss-list@subscribe.ru
Отписаться: http://subscribe.ru/member/unsub?grp=comp.soft.linux.discuss&email=
http://subscribe.ru/ mailto:ask@subscribe.ru

Ответить   Tue, 25 Nov 2003 07:52:40 +0300 (#24988)

 

i386-asplinux-linux-gnu)

recode cp1251..koi8-r filename[.ext]
забыли да :-)))

-*Информационный канал Subscribe.Ru
Написать в лист: mailto:comp.soft.linux.discuss-list@subscribe.ru
Отписаться: http://subscribe.ru/member/unsub?grp=comp.soft.linux.discuss&email=
http://subscribe.ru/ mailto:ask@subscribe.ru

Ответить   Русскин Андрей Олего вич Tue, 25 Nov 2003 13:51:03 +0300 (#25365)

 

i686)

Использую asrecod

Его преимущество - даже при "плохом" (в смысле кодировки) исходном файле не вылетает
по ошибке.
--

С наилучшими пожеланиями
Крохин Анатолий
icq 20060869

-*Информационный канал Subscribe.Ru
Написать в лист: mailto:comp.soft.linux.discuss-list@subscribe.ru
Отписаться: http://subscribe.ru/member/unsub?grp=comp.soft.linux.discuss&email=
http://subscribe.ru/ mailto:ask@subscribe.ru

Ответить   Крохин ААнатолий ААлександрович Wed, 26 Nov 2003 08:33:30 +0300 (#25525)

 

my_temp_ema***@h*****.ru пишет:

recode cp1251..koi8-r <file-name>

Ответить   Max Vasin Tue, 25 Nov 2003 17:51:09 +0300 (#25301)