nixp.ru v3.0

26 апреля 2024,
пятница,
03:01:23 MSK

Zar написал 26 октября 2004 года в 23:57 (10095 просмотров) Ведет себя как мужчина; открыл 56 тем в форуме, оставил 165 комментариев на сайте.

Я постаил прогу recode, но что-то мне с ней не совладать! Может лучше что-нибудь другое поставить? Как с этой работать?

fly4life

man iconv

Zar
fly4life
man iconv

Да не, это что-то не то. Это описание сишной библиотеки. Не писать же мне свою прогу!

Genie


$ 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.

где травку брали? ;)

Ilyas

http://www.linuxdoc.ru/manpages/man1/iconv.1.html

Zar

Не-е, у меня какой-то другой:))) :

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

Что делать?

Ilyas

http://www.linuxdoc.ru/manpages/man3/iconv.3.html

Zar

Ой, блин, все работает!!! Я просто вначале по дури смотрел результат во входном файле, а не в out.txt!!!! Всем спасибо!!!

Ilyas
Zar
Я попробовал так: recode UTF-8..KOI8-R file.txt — нифига.

Так тоже не пашет:iconv -fUTF8 -tKOI8-R -o out.txt file.txt

Что делать?

iconv -f UTF8 -t KOI8-R file.txt

может так

Zar

Все уже пашет!

Последние комментарии

ecobeingecobeing.ru
Экология и вегетарианство на благо всем живым существам Планеты.