Ervin
Ervin

Reputation: 2452

How to insert special language characters in PHP into MySQL database?

I am using latest PHP and latest MySQL. I have tried htmlspecialchars and mysql_real_escape_string but it inserts ? instead of the special character. I am inserting into varchar and text type fields. Special language characters like őúáűăţşîâ but it maight be other languages' characters.

Upvotes: 2

Views: 1227

Answers (1)

Ben D
Ben D

Reputation: 14499

Check the default encoding for your server, your meta-tag encoding declaration, and your collation on your database and tables are. You may want to make sure that everything is set to UTF8 if you're going to have lots of language characters.

Upvotes: 2

Related Questions