Re: Changing encoding on text

Wilson Bilkovich
Wed, 28 Dec 2005 19:37:54 -0000

On 12/28/05, Gitte Wange <gitte-vGiBmfdlLJY@public.gmane.org>
wrote:
> Hello,
>
> I have a set of templates creating some files for me. All data on my
> site is encoded using iso-8859-1. Now I want to save the text in the
> file using utf-8. I have tried using iconv, but whenever I have the
> require "iconv" statement in my model, there is some error
happening in
> the model and the model doesn''t get loaded (not sure how to debug
that).
>
> What approches to change encoding is there besides iconv?
>
Try opening an irb session, and typing:
require ''iconv''
Iconv.new(''UTF-8'',
''iso-8859-1'').iconv(''Test'')

If that fails, at least you know your problem isn''t Rails-specific.
If you''re on Windows, your problem could easily be: