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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:34:43+00:00 2026-06-12T09:34:43+00:00

I am parsing a XML and putting it into MySQL. Now MySQL is showing

  • 0

I am parsing a XML and putting it into MySQL. Now MySQL is showing following error for some specific records inserting:

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xEAm-Kh\xEA...'

When i check the data inside XML, it is showing like iêm-Khê
So the Special Character ê is transforming into xEA
What is it?

How can i get it solved to maintain & put its original Character into Database?

FYI, here is some info.:

  • My whole MySQL DB itself is using latin1_swedish_ci
  • But that TABLE & COLUMN are using utf8_general_ci
  • ** When i manually Copy/Paste that iêm-Khê values into the MySQL Record directly, it is saved. (I mean, MySQL is accepting that Special Characters.) So i think the issue is at the Coding side.
  • 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-12T09:34:44+00:00Added an answer on June 12, 2026 at 9:34 am

    After some additional research I ran across two possible approaches to a solution:

    - the first option is to use php's utf8_encode() function.
    - the second option uses some code with the PDO using set names (though there seemed to be some discussion as to whether or not this worked for everyone.
    
    $handle = new PDO("mysql:host=localhost;dbname=dbname",
        'username', 'password', 
        array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
    

    The following link had some other useful information:
    See here

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

Sidebar

Related Questions

I've used following code for parsing XML file in c++. http://www.codeproject.com/Articles/176236/Parsing-an-XML-file-in-a-C-C-program . Now I
I'm parsing XML and putting it in a simple table like this: function showData(message)
i'm working on parsing xml documents and stroring the parsed elements into database therefore
I am parsing XML with DOM i have some data tags like: <data> <option>abc</option>
I have gotten this error in the strings.xml file: error: Error parsing XML: unbound
I finally finished my XML parsing code, and now looking at it, it scares
however tomcat is throwing the error : IOException parsing XML document from ServletContext resource
I have encountered an ArrayStoreException when parsing XML to Java Classes in the following
I am parsing XML, with simplexml_load_string() , and using the data within it to
I am parsing xml file from server using xmlParser in Android. When i print

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.