0

We just moved to a new server(dedicated) and we have problems displaying properly croatian characters(č ć ž š đ) from mysql db.

-MySQL OBDC driver is 5.1
-Table collation is latin2_croatian_ci.
- Text field in table(for test) is collation latin2_croatian_ci
- Encoding on test page is utf 8

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

We add one sentance trough phpmyadmin in this (test) text field and in phpmyadmin it looks fine. But on our page: č = ? ..

We tried everything, adding utf 8 in connection string, defining charset trough asp, trough IIS.. nothing works..

Android Developer
  • 987
  • 1
  • 8
  • 22
  • Why aren't you using UTF-8 in the database? Besides the small chance it may fix the problem, it will stop the database from corrupting the data. – Karol S Aug 02 '14 at 12:41
  • We tried with utf8_unicode_ci at first. – Vedran Vuleta Aug 02 '14 at 12:52
  • Wait, I just noticed: You mentioned *collation* in the database, but what is the *encoding*? Collation only influences sorting. Also, you have to set encoding to utf8 or utf8mb in the OBDC connection. – Karol S Aug 02 '14 at 13:00
  • I have collation on each table and each field in table. Utf8 is defined in OBDC con string. Where can i set encoding for database? – Vedran Vuleta Aug 02 '14 at 13:19
  • Are you sure that the page itself was saved as `UTF-8`? The actually source ASP page needs to be also be saved in the correct encoding are you will get these kind of issues. Use an editor like Notepad or Visual Studio to check what encoding the page is saved with. Have a look at **[this answer](http://stackoverflow.com/a/21914278/692942)** I provided to similar topic. – user692942 Aug 02 '14 at 14:23

0 Answers0