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

**URL:** <https://www.ruby-forum.com/t/encoding-caracters-issue-with-rails-oracle-ruby-oci-under/49076>\
**Category:** Rails\
**Created:** [November 29, 2005, 3:08pm UTC](https://www.ruby-forum.com/t/encoding-caracters-issue-with-rails-oracle-ruby-oci-under/49076 "2005-11-29T15:08:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathieu.chappuis.li](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cab0a1/32.png) [@mathieu.chappuis.li](https://www.ruby-forum.com/u/mathieu.chappuis.li)\
**Post date:** [November 29, 2005, 3:08pm UTC](https://www.ruby-forum.com/t/encoding-caracters-issue-with-rails-oracle-ruby-oci-under/49076/1 "2005-11-29T15:08:36Z")

</div>

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
