How to store both cyrillic and latin in MySQL and is there anything special that I should know to display cyrillic with PHP? (conversions etc.)

Thnx in advance

Recommended Answers

All 3 Replies

Set up your database and all connections to use UTF-8 as the default character set.

I have set, but in database everything becomes [BLOB] or something and I can't display it on the web page, some strange characters are displayed instead.

Can you explain in more details?

Thnx

There are numerous places where character encoding can be specifically set, among them database definition, table definition, field definition and interface character set. These all have to fit with each other to preserve the original data encoding.
Study this: http://www.koch.ro/blog/index.php?/archives/50-MySQL-character-sets-primer.html (including references) and this: http://www.phpwact.org/php/i18n/charsets
Make sure that your HTML has the correct encoding announced either in an HTML header or in a meta-tag (Content: text/html; charset=utf8)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.