Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8628063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:26:26+00:00 2026-06-12T08:26:26+00:00

Hi I have an oracle database that stores some data. It contains some non

  • 0

Hi I have an oracle database that stores some data. It contains some non english text as well, e.g. “TEST”. The quote is not the english quote “. The problem is when I retrieve it from Rails 2.2.2 (Ruby 1.8.7), this database model’s field value returns question marks in the erg views, so “TEST” becomes ?TEST?. However under Rails 3, it is showing correctly.

The code in the erb that displays the value is

User.first.description

I do set the encoding in the database.yml with the following but does not help

encoding: UTF8
collation: utf8_unicode_ci

Could it because Ruby 1.9 handles the encoding better than Ruby 1.8. Is there a way to fix this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:26:27+00:00Added an answer on June 12, 2026 at 8:26 am

    Yes, ruby 1.9 handles encoding different than 1.8. Also, Rails 3 makes encoding easier by trying to make sure everything is in UTF-8.

    Most likely your problem is that the string was encoded with Latin-1 and Rails 2 tries to read it as a UTF-8 encoding. There are several monkey patches online that you can try for your database, or you can do a one time script to re-encode all of the fields in your database.

    I recommend reading this, for further understanding on how encoding works with Ruby: Encodings, Unabridged (by Yehuda Katz)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 Oracle database instances with the same data and scheme that I
I have a simple web service that uses an oracle database. When I test
I have some Java code that connects to an Oracle database using DriverManager.getConnection(). It
I have a C# program that uses System.Data.OracleClient to access an oracle database. The
We have an Oracle database that contains IP addresses stored as decimal integers -
My Oracle database contains some simple, rarely-changed data (it takes about months or even
I have an Oracle database that I am connecting to with PHP OCI8. One
I have an oracle 10g database that has 2 tables: a REBATES table, and
We have an Oracle database here that's been around for about 10 years. It's
I have a table in an Oracle Database that has, among others, a DATE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.