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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:15:03+00:00 2026-05-20T05:15:03+00:00

I have a client who has messed up characters in his database (I inherited

  • 0

I have a client who has messed up characters in his database (I inherited this project, and my guess is when users entered the text it wasn’t processed or stored correctly, either via PHP or MySQL or both). For example,

Ex 1: the database field (“about”) has values that look like this:

Dans la nature, face au ciel, un b%uFFFDb%uFFFD qui sourit quand on lui souffle sur le visage.

The collation on this field in MySQL is currently set to : latin1_swedish_ci

Ex 2: Another field (“description”) looks like this:

Vidéo tournée dans le cadre

The collation on this field in MySQL is currently set to : utf_general_ci

Basically I have to fix all this. These examples are French but there are other records that may contain Japanese or Chinese (thus double-byte chars).

For entries like example 1, my plan is to change the field to utf_general_ci, and write a script to convert all the unicode codes to the characters (I’m not exactly sure how to do this latter part…ideas??).

For entries like example 2, I’m not sure what those odd characters are.

Is utf_general_ci the collation I should be using here to support all possible languages in one database table?

Other stats:

[peter@akebono A_PSG]$ php –version
PHP 5.2.6 (cli) (built: May 8 2008 08:54:23)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Debugger v5.2.14, Copyright (c) 1999-2008, by Zend Technologies

  • 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-20T05:15:03+00:00Added an answer on May 20, 2026 at 5:15 am

    Have a look at this article on what approaches you could take : http://www.phpwact.org/php/i18n/charsets

    I remember we had the same problem, but we used a mysql utility to change the encoding. I forget which now.

    With PHP, you should be looking at iconv and the other character set encoding/decoding methods to detect the current encoding and change it to whatever standard you’re going to go with.

    EDIT

    Also, have a look at the multi byte methods in php. Start with : http://www.php.net/manual/en/function.mb-convert-encoding.php

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

Sidebar

Related Questions

No related questions found

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.