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

  • Home
  • SEARCH
  • 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 60075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:06:18+00:00 2026-05-10T18:06:18+00:00

I’ve been pulling my hear out over this problem for a few hours yesterday:

  • 0

I’ve been pulling my hear out over this problem for a few hours yesterday:

I’ve a database on MySQL 4.1.22 server with encoding set to ‘UTF-8 Unicode (utf8)’ (as reported by phpMyAdmin). Tables in this database have default charset set to latin2. But, the web application (CMS Made Simple written in PHP) using it displays pages in utf8…

However screwed up this may be, it actually works. The web app displays characters correctly (mostly Czech and Polish are used).

I run: ‘mysqldump -u xxx -p -h yyy dbname > dump.sql’. This gives me an SQL script which:

  • looks perfect in any editor (like Notepad+) when displaying in UTF-8 – all characters display properly
  • all tables in the script have default charset set to latin2
  • it has ‘/*!40101 SET NAMES latin2 */;’ line at the beginning (among other settings)

Now, I want to export this database to another server running on MySQL 5.0.67, also with server encoding set to ‘UTF-8 Unicode (utf8)’. I copied the whole CMS Made Simple installation over, copied the dump.sql script and ran ‘mysql -h ddd -u zzz -p dbname < dump.sql’. After that, all the characters are scrambled when displaying CMSMS web pages.

I tried setting:
SET character_set_client = utf8;
SET character_set_connection = latin2;

And all combinations (just to be safe, even if it doesn’t make any sense to me): latin2/utf8, latin2/latin2, utf8/utf8, etc. – doesn’t help. All characters still scrambled, however sometimes in a different way :).

I also tried replacing all latin2 settings with utf8 in the script (set names and default charsets for tables). Nothing.

Are there any MySQL experts here who could explain in just a few words (I’m sure it’s simple after all) how this whole encoding stuff really works? I read 9.1.4. Connection Character Sets and Collations but found nothing helpful there.

Thanks, Matt

  • 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. 2026-05-10T18:06:19+00:00Added an answer on May 10, 2026 at 6:06 pm

    Ugh… ok, seems I found a solution.

    MySQL isn’t the culprit here. I did a simple dump and load now, with no changes to the dump.sql script – meaning I left ‘set names latin2’ and tables charsets as they were. Then I switched my original CMSMS installation over to the new database and… it worked correctly. So actually encoding in the database is ok, or at least it works fine with CMSMS installation I had at my old hosting provider (CMSMS apparently does funny things with characters encoding).

    To make it work on my new hosting provider, I actually had to add this line to lib/adodb/drivers/adodb-mysql.inc.php in CMSMS installation:

    mysql_query('set names latin2',$this->_connectionID);

    This is a slightly modified solution from this post. You can find the exact line there as well. So it looks like mysql client configuration issue.

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

Sidebar

Ask A Question

Stats

  • Questions 58k
  • Answers 58k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer If you 'pre-compile' the web site using the aspnet_compiler.exe tool… May 11, 2026 at 8:38 am
  • added an answer Changed the HTML charset to ISO-8859-1 fixed the problem! Silly May 11, 2026 at 8:38 am
  • added an answer I find the best way to set yourself up for… May 11, 2026 at 8:38 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

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.

      Related Questions

      No related questions found