Jakob Nielsen
Jakob Nielsen

Reputation: 5198

Special character strings in phpMyAdmin

I need to store korean strings in my mysql database. For managing the database I am using phpmyadmin.

Whenever I try to insert a table entry containing korean letters I get the following error message:

 1 dataentry added.
Warning: #1366 Incorrect string value: '\xEB\x8B\xAD \xEC\xB3...' for column 'name' at row 1

The string will then be showed as ? ?

So my question is how to I correctly store special characters like korean letters into my database.

Upvotes: 0

Views: 3413

Answers (1)

Murad Hasan
Murad Hasan

Reputation: 9583

Here is two reason why some data entry miss to show their real face.

  1. Don't use a meta tag in head of the page.
  2. Collation not set when database create.

Solution:

When you insert in from a html page, you have to use a meta tag "<meta charset="utf-8">" in head section, so that the page can understand here is some unicode to insert.

and when you insert a unicode to your database, the field must have to "utf8_general_ci" Collation set.

Upvotes: 1

Related Questions