views:

366

answers:

2

Just trying to handle special characters into a string field on my model.

When it saves to my Oracle database which is set to AL32UTF8 it is converting them to ???

Tiny-mce is hooked up on one of the other fields and I was able to configure it to convert a backwards apostrophe for instance to

‘

Just need to decode / convert my string to do something similar before active record saves it to the DB and it gets all messed up.

We are using Ruby 1.8.6 and Rails 2.2.2

Any one have a quick fix for this?

A: 

Do you have

encoding: utf8

in your database.yml?

neutrino
yes i do.......
Mark Redding
A: 

Months later we appear to have figured this one out.

NLS_LANG environment variable was not being set. We set this to be the same as the database, bounced the web server and it started working.

Mark Redding