Tim Ferrell wrote:
> data = Iconv.iconv("ISO-8859-1", "UNICODE", data)[0]
>
> #<Errno::ENOENT: No such file or directory - iconv("ISO-8859-1",
> "UNICODE")>
>
> I am totally lost on this ... any ideas?
Your iconv install is working fine. Did you use my installer?
The library (which is written in C, so that's its excuse) throws the C error
ENOENT, which is a generic error meaning "file not found," when you feed it
an encoding name it doesn't know about. "Unicode" is one of those encoding
names.
I'm not sure exactly what you're after here, but (from
http://www.unicode.org/glossary) "There are seven character encoding schemes
in Unicode: UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, and
UTF-32LE." There are also UCS-2 (and UCS-2BE and UCS-2LE, relatively common)
and UCS-4, which are all different encoding schemas.
You probably want "UTF-8". It's popular.
> Also is there any kind of alternative to iconv on Windows?
I'm not aware of anything better supported in Ruby. There is another lib
that I've forgotten the name of. So I would say, "no." No.
Cheers,
Dave