Oracle legacy database with ISO-8859-1

Hi,

I ve got a legacy oracle database in ISO-8859-1 encoding, which is in
use by other applications as well.

Now, I would like to add a rails app for new features. Rails is using
unicode so special characters are stored incorrectly in the database.

Does anybody know how I might fix that. I ve already told my
controllers to use that charset, but my models still store these
values as utf8 and that goes directly into the database. :frowning:

Converting the whole database to unicode is not an option due to the
other legacy apps.

Hope anybody can help me.

thanks a lot in advance.


Volker

hello, you should change kcode in your environment.rb : $KCODE =
‘NONE’ to specify ruby interpreter you don’t use utf-8. and check
“encoding” parameter in database.yml.

On Nov 27, 4:02 pm, “[email protected]

Please do post back to tell us if Jean-Sebestien’s suggestions work. If
not,
for my non-rails apps, I set the NLS_LANG variable in the environment to
the
character set of the database before starting the web server. This might
or
might not help.


Cynthia K.
[email protected]

Hi,

Unfortuently, setting the KCODE to NONE did not fix my problem. The
strings are still stored with unicode settings in my database.
I ve set the encoding in database.yml, however, so far I ve read
nowhere that the oci adapter supports that argument.

Im not sure if I understood that NLS_LANG suggestion… However, I can
assure you that I have no control at all over the other systems… :frowning:

Anyone else with an idea… Maybe somebody knows about a plugin which
converts between charsets during write/read operations to the
database???


Volker

sorry, i thought it could work with it (it does with postgres and
mysql). i just find an article about using oracle with rails, i hope
it could help you:
http://blog.zmok.net/articles/2007/05/07/ruby-on-rails-with-oracle

On Nov 28, 9:25 am, “[email protected]

Great,

setting ENV[‘NLS_LANG’]=‘GERMAN_GERMANY.UTF8’ in my environment file
fixed my issues.

Thanks a lot.


Volker