NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: iconv command problem

On 2011/3/28 14:19, Marc Balmer wrote:
Am 28.03.11 08:06, schrieb H Xu:
Hello Everyone,

On both Linux and FreeBSD, the following command could be used to remove
invalid characters:

$ man cc | iconv -c

However, on NetBSD, it seems that iconv doesn't support this kind of
usage. Is there any solution?

Actually it does work like you described.  -c is a valid option to iconv
in NetBSD and it does strip characters that it can not convert.

It gives the following on my NetBSD:

% man cc | iconv -c
Usage:  iconv [-cs] -f <from_code> -t <to_code> [file ...]
        iconv -f <from_code> [-cs] [-t <to_code>] [file ...]
        iconv -t <to_code> [-cs] [-f <from_code>] [file ...]
        iconv -l

Isn't it weird?

H Xu

Home | Main Index | Thread Index | Old Index