Encoding caracters issue with Rails (Oracle, Ruby-Oci under


#1

Dears,

A bit familiar with ROR + Postgres or MySQL, I begin a project with
Rails and Oracle (8.1.7 under Win32)

I give a test drive for providing a Web Client to an existing legacy
application.

Under WinXP I’ve used “ruby-oci8-0.1.13-mswin.rb” from ruby forge. It
work out of the box for me without building the ruby-oci source tree
nor adding Ruby-DBI.

Just using :
-Ruby O.-Click Installer
-ruby ruby-oci8-0.1.13-mswin.rb
-rubygems
-and gems for Rails and dependencies

The database encoding used is French :
NLS_LANG=French_France.WE8ISO8859P1 also tried
FRENCH_FRANCE.WE8MSWIN1252

Ruby+OCI and Rails connect fine to the database, but special french
enhanced caracters are not properly renderer.

MyLegacyTable.find(113)
=> #<MyLegacyTable:0x3889450 @attributes={

[SNIP]

“objet”=>“St\351phane \340 la fa\347ade des anc\352tres”,

[SNIP] }>

How correctly render theses high chars (\xxx) correctly throught Rails
to the browser ?

Thanks!


Mathieu