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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:16:02+00:00 2026-06-14T08:16:02+00:00

The mysql table that I am inserting it into (let’s call it foo) is

  • 0

The mysql table that I am inserting it into (let’s call it foo) is latin1 character encoded (shown via the command shown How do I see what character set a MySQL database / table / column is?) and my database has the following result after show variables:

| character_set_client                    | latin1                                                                                    |
| character_set_connection                | latin1                                                                                    |
| character_set_database                  | latin1

In foo I have an entry stored in a varchar(255) col with the string foo® and when I view it in hex it shows that it is encoded in utf8 (666F6FC2AE). Running a select query from the mysql prompt shows me foo®. However when I insert the same string encoded in latin1 666F6FAE I get a foo� when I run a select in the same mysql command prompt. Why is it that I have utf8 encoded data in my latin1 table and why am I not able to insert latin1 encoded data into my table?

  • 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-14T08:16:03+00:00Added an answer on June 14, 2026 at 8:16 am

    Your command line client seems to use UTF-8 for display/input/output. 666F6FC2AE is not a UTF-8 encoded value in a latin-1 column, it’s the latin-1 code for “foo®”. Getting this back from the database, your CLI interprets the latin-1 data as UTF-8, displaying “foo®”.

    To illustrate:

    • CLI operates in UTF-8
    • you enter “foo®” on the CLI, which is 66 6F 6F C2AE
    • database connection is set to latin-1
    • database interprets input as latin-1, thinks you want to store “foo®”
    • column encoding is latin-1, no problem, database stores “foo®”
    • you fetch data from database, all latin-1, you get back 66 6F 6F C2 AE
    • CLI interprets this as UTF-8, displays “foo®”

    You need to set your connection encoding to utf8, since your client sends UTF-8. That, or convince your CLI to operate in Latin-1, which may be harder/less convenient/causing more side effects.

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

Sidebar

Related Questions

I have a php script that inserts values into mySQL table INSERT INTO stories
I am getting strange error while inserting data into mysql table column. Details: Create
I'm inserting some HTML into a MySQL database table. But when I get it
I am inserting some data into a MySQL table using CodeIgniter. Because I am
I have a MySQL table that looks something like this: +-----+------------+ | id |
I have a mysql table that looks like this: id col2 col3 col4 1
I have a remote mySQL table that I use in a few tools, occasionally
I have a MySQL table that holds many entries with repeated IDs (for various
I have mysql table that has a column that stores xml as a string.
I have a MySQL table that defines values for a specific customer type. |

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.