Hello,
I would like to export manual pages to plain text files.
man CommandName | col -bx > CommandName.txt
The above statement works successfully on Mac OS X. However, it often fails on my old Linux. The problem occurs if the source file of the manpage contains an escape sequence for Non-ASCII character such as "\(co" for the copyright character (0xA9).
Whenever "col -bx" encounters an non-ASCII character (0x80 through 0xFF), it aborts any further process and displays the error message, "Invalid or incomplete multibyte or wide character".
The man command on Mac OS X automatically converts non-ASCII characters into ASCII equivalents such as "(C)" for the copyright character. Therefore, col does not receive non-ASCII characters, and the job successfully completes.
On the other hand, the man command on my old Linux does not convert non-ASCII characters into ASCII equivalents. Therefore, col receives non-ASCII characters, and the job fails.
Please suggest me appropriate solutions for this problem.
Is it possible to force the man command on my old Linux to convert non-ASCII characters into ASCII equivalents? Or, is it possible to force the col command to accept non-ASCII characters?
Here are some examples of failed CommandNames with their non-ASCII characters that caused the failures.
find (curly quote, 0xB4)
hexdump (middle dot, 0xB7)
ln (copyright char, 0xA9)
Many thanks in advance.