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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:43:12+00:00 2026-06-09T22:43:12+00:00

I have a table for which the collation is set to ut8_general_ci. The columns

  • 0

I have a table for which the collation is set to ut8_general_ci. The columns in the table are also set to this encoding.

For some reason though, when I view my table in MySQL the text in the table is rendered/stored as ISO Latin 1, and if I wan’t to edit any of the text in any of my entries in the table I have to use ISO Latin 1 encoding to make sure the text renders correctly on the page (the page user UTF8).

Manually entering ISO Latin 1 text to the table normally works, but for a couple of entries it isn’t working, i.e. the characters aren’t rendering correctly on my page (they also don’t render correctly when I use UTF8). Hence this question. If I could work out how MySQL handles character encoding I could probably sort this issue.

So, the question is can someone explain how MySQL handles encoding, and specifically why I am seeing ISO Latin 1 characters in my table when the collation is set to UTF-8.

  • 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-09T22:43:13+00:00Added an answer on June 9, 2026 at 10:43 pm

    It turns out that despite setting the character encoding on the page and on the table and the columns of the table, the connection to the table was defaulting to ISO Latin 1. Adding ‘SET NAMES utf8’ to my query fixed this, i.e.

    $pdo = new PDO('mysql:dbname=****;host=localhost', '****', '****',
                    array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
    

    The article deceze linked to was very helpful. Thanks!

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

Sidebar

Related Questions

I have MySQL db, db engine InnoDB, collation set to utf8-utf8_general_ci (also tried utf8_unicode_ci).
I have table which contains double values stored in mysql database ...I need to
I have a table which stores the data related to posts in this format
I have a table which consists of a few columns, including a Key Value
I have a table which is currently displayed like this: Question OptionType What is
I've a field of type char(1) in my MySQL table which basically can have
I have table in which I am inserting rows for employee but next time
i have a table which has many fields but i want to get count
I have a table which i want to store all the outputs into one
I have one table which contains events and dates, and another which contains the

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.