On Sat, Feb 20, 2021 at 2:59 PM Silas <silas_nbli...@nocafe.net> wrote: > > On Fri, Feb 19, 2021 at 08:08:25PM -0700, Bob Proulx wrote: > >I'll be honest and say I did not look but on another system I am using > >"iconv" for this type of thing routinely. I will cross my fingers and > >hope it is available in pkgsrc. > > > > iconv -f UTF-8 -t ASCII//TRANSLIT <filein >fileout > > It seems it is not possible on NetBSD 9.0 iconv :-( > > $ echo 'pão' | iconv -f UTF-8 -t ASCII//TRANSLIT > iconv: iconv_open(ASCII//TRANSLIT, UTF-8): Invalid argument > > Is there something that could be installed from pkgsrc (or another > iconv implementation) to make it work?
My guess - and it is only a guess - you have to use a code page, and not just ASCII. The man page for iconv is at https://www.gnu.org/software/libiconv/documentation/libiconv-1.16/iconv.1.html. A list of the encodings is at https://www.gnu.org/software/libiconv/documentation/libiconv-1.16/iconv_open.3.html. Jeff