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 6029505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:53:47+00:00 2026-05-23T04:53:47+00:00

I found that utf-8 is the standard , but Mysql doesn’t fully support utf-8(4bytes)

  • 0

I found that utf-8 is the standard , but Mysql doesn’t fully support utf-8(4bytes) .

Now here is my situation.
My collation variables of mysql show latin1 but the encoding mechanism in “database.yml”(rails) is utf8 .

I have a database with around 20 tables and around 1k rows in each table.
I am using Mysql 5.0 , ruby 1.8.7 and rails 3 .

I would like to support at least a few non printable charters.
What would be the best option ?

  1. Should I change the whole database to utf-8 ( converting is painful and also mysql fully doesn’t support utf-8).
  2. Should I change the encoding mechanism in “database.yml” to latin1 ( will the new setting be compatible with old data that is already stored ).
  3. Is there any other solution ?

Thank you.

  • 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-05-23T04:53:48+00:00Added an answer on May 23, 2026 at 4:53 am

    I think that the :encoding field in database.yml
    is just what is used when creating a new database.

    It won’t break your app if you change this field

    (in fact I think it won’t do anything, unless you use rake db:create)

    I suggest, if your app is targeting anyone outside of the US or western europe
    you should be using utf8.
    I find it surprising that Ubuntu still ships with the default as latin1.

    This may be “optimised” for space
    but causes a hassle for almost anyone with a client facing website.

    There are various links on google for how to convert your database to UTF8
    http://www.devcha.com/2008/03/convert-existing-mysql-database-from.html

    something like

    /* convert the default character set (used for new tables) */
    ALTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    
    /* convert a specific table */
    ALTER TABLE db_table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
    

    of course….

    always back up your data, and try it out on a staging machine first

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

Sidebar

Related Questions

We’ve found that the unit tests we’ve written for our C#/C++ code have really
I've found that on some occasions I can edit the source while debugging. Are
I have found that my HTML is, to be honest, very clunky. Small, simple
I have found that there is generally a singe type or namespace that takes
Whilst refactoring some legacy C++ code I found that I could potentially remove some
I've installed Ubuntu Server (8.04) into Parallels and found that the system time/clock ran
I've been parsing through some log files and I've found that some of the
I'm using a RichTextBox in WinForms 3.5 and I found that when I programmatically
After trying to setup my site for Google Webmaster Tools I found that my
I have looked on FaceBook Developer page and found that it's possible to create

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.