Zar
написал 26 октября 2004 года в 23:57 (10748 просмотров)
Ведет себя
как мужчина; открыл 56 тем в форуме, оставил 165 комментариев на сайте.
Я постаил прогу recode, но что-то мне с ней не совладать! Может лучше что-нибудь другое поставить? Как с этой работать?
Последние комментарии
-
OlegL, 17 декабря 2023 года в 15:00 →
Перекличка
21
-
REDkiy, 8 июня 2023 года в 9:09 →
Как «замокать» файл для юниттеста в Python?
2
-
fhunter, 29 ноября 2022 года в 2:09 →
Проблема с NO_PUBKEY: как получить GPG-ключ и добавить его в базу apt?
6
-
Иванн, 9 апреля 2022 года в 8:31 →
Ассоциация РАСПО провела первое учредительное собрание
1
-
Kiri11.ADV1, 7 марта 2021 года в 12:01 →
Логи catalina.out в TomCat 9 в формате JSON
1
DevOps as a Service from Palark
24/7 SRE & DevOps service to cover all your Kubernetes needs.

man iconv
Да не, это что-то не то. Это описание сишной библиотеки. Не писать же мне свою прогу!
$ man iconv ICONV(1) Debian GNU/Linux ICONV(1) ... DESCRIPTION The iconv program converts the encoding of characters in inputfile from one coded character set to another. The result is written to standard output unless otherwise specified by the --output option.где травку брали? ;)
http://www.linuxdoc.ru/manpages/man1/iconv.1.html
Не-е, у меня какой-то другой:))) :
ICONV(3) Linux Programmer’s Manual ICONV(3)
NAME
iconv — perform character set conversion
SYNOPSIS
#include
size_t iconv(iconv_t cd,
char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
DESCRIPTION
The argument cd must be a conversion descriptor created
using the function iconv_open.
The main case is when inbuf is not NULL and *inbuf is not
NULL. In this case, the iconv function converts the
multibyte sequence starting at *inbuf to a multibyte
sequence starting at *outbuf. At most *inbytesleft bytes,
starting at *inbuf, will be read. At most *outbytesleft
bytes, starting at *outbuf, will be written.
The iconv function converts one multibyte character at a
time, and for each character conversion it increments
*inbuf and decrements *inbytesleft by the number of con-
verted input bytes, it increments *outbuf and decrements
*outbytesleft by the number of converted output bytes, and
it updates the conversion state contained in cd. The con-
version can stop for four reasons:
Я попробовал так: recode UTF-8..KOI8-R file.txt — нифига.
Так тоже не пашет:iconv -fUTF8 -tKOI8-R -o out.txt file.txt
Что делать?
http://www.linuxdoc.ru/manpages/man3/iconv.3.html
Ой, блин, все работает!!! Я просто вначале по дури смотрел результат во входном файле, а не в out.txt!!!! Всем спасибо!!!
iconv -f UTF8 -t KOI8-R file.txt
может так
Все уже пашет!