h2. What is it? Iconv is a library used for charset conversion. h2. iconv in Ruby "Rubys Iconv":http://www.ruby-doc.org/stdlib/libdoc/iconv/rdoc/index.html is a wrapper class for the UNIX 95 iconv() function family, which translates string between various encoding systems. See "Open Group’s on-line documents":http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html for more details. h2. Iconv in Rails There were some iconv related [[Rails 0.11 Upgrade Problems]]. Iconv is required by the SaltedHashLoginGenerator(due to a dependency on "Localization"). h2. windows h3. missing iconv Depending on which Ruby distribution you have installed, the iconv ruby extension may not be installed (see if you have @ruby\lib\ruby\1.8\i386-mswin32\iconv.so@). The "Ruby-mswin32":http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html distribution contains the required files. Inside the zip, the path to the file is: lib/ruby/1.8/i386-mswin32/iconv.so h3. missing iconv.dll If requiring iconv fails complaining about how "iconv.dll was not found", such as:
rb(main):001:0> require 'iconv'
produces: !http://omara.ca/rails/wiki_content/iconvdll_not_found.png(error dialog: iconv.dll was not found)!
LoadError: 126: The specified module could not be found.   - d:/ruby/lib/ruby/1.8/i386-mswin32/iconv.so
        from d:/ruby/lib/ruby/1.8/i386-mswin32/iconv.so
        from d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
        from (irb):1
Iconv.dll can be aquired from a number of sources. It is available as a seperate download from the "gettext for win32":http://sourceforge.net/projects/gettext project on SourceForge. # download "libiconv-win32":http://sourceforge.net/project/showfiles.php?group_id=25167&package_id=51458 # extract the file @bin/iconv.dll@ to @Windows/system32@ (or somewhere else on your path) # If that doesn't work, try copying iconv.so to lib\ruby\1.8\i386-mswin32\ as specified in "this mailing list post":http://marc.theaimsgroup.com/?l=ruby-talk&m=110842201106045&w=2