Discussion:
Alternative to iconv
Walter Barnes
2011-10-05 22:04:47 UTC
Permalink
Hi all,

I have a large csv file (1.5GB) that I need to convert from UTF-16 to
UTF-8 however it appears iconv is not currently included in cygwin. Due
to the large size of the file I would rather not open it in an editor.
Is there an alternative command line tool I can use?

Thanks!
Walter
Eric Blake
2011-10-05 22:13:28 UTC
Permalink
Post by Walter Barnes
Hi all,
I have a large csv file (1.5GB) that I need to convert from UTF-16 to
UTF-8 however it appears iconv is not currently included in cygwin.
Huh? iconv is too part of cygwin:

$ cygcheck -p iconv\\.exe
Found 3 matches for iconv\.exe
libiconv/libiconv-1.13.1-1 GNU character set conversion library and
utilities
libiconv/libiconv-1.13.1-2 GNU character set conversion library and
utilities
libiconv/libiconv-1.14-1 GNU character set conversion library and utilities

Maybe you just need to rerun setup.exe and install the libiconv package,
if you don't already have it present on your machine.
--
Eric Blake ***@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
Walter Barnes
2011-10-05 22:42:10 UTC
Permalink
Thanks Eric, I had previously ran the setup utility and searched for
iconv and found only the libraries (libiconv and libiconv2). Also,
libiconv2 was pre-installed but I was still getting "command not found"
when I attempted to run iconv. I went ahead and installed the libiconv
package in addition to libiconv2 and it works now... maybe a note in the
package description that libiconv2 does not include the executable?

Thanks again,
Walter
Post by Eric Blake
Post by Walter Barnes
Hi all,
I have a large csv file (1.5GB) that I need to convert from UTF-16 to
UTF-8 however it appears iconv is not currently included in cygwin.
$ cygcheck -p iconv\\.exe
Found 3 matches for iconv\.exe
libiconv/libiconv-1.13.1-1 GNU character set conversion library and
utilities
libiconv/libiconv-1.13.1-2 GNU character set conversion library and
utilities
libiconv/libiconv-1.14-1 GNU character set conversion library and
utilities
Maybe you just need to rerun setup.exe and install the libiconv
package, if you don't already have it present on your machine.
Loading...