HTML: Russian letters
  • Hello. I have just uploaded a website to set up the database. Looks like everything works just fine, I've set up every type just like I had it on my localhost but when I load the page there are Russian letters instead of Lithuanian ones. Those columns in MySQL are set to utf8_lithuanian_ci collation and I even specify that I want data returned in utf8 (mysql_query("SET NAMES 'utf8'");). My HTML has a meta tag to use utf8 charset and even tried to specify the language:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="lt" />


    The problem isn't in the database. I even ran with my finger over the upper line of the keyboard (the one with Lithuanian letters) in my index.php and it showed
    Д…Д…ДЌД™Д—ДЇЕЎЕіЕ«90
    instead of
    ąąčęėįšųū90


    The server is in Ukraine (I think).

    How do I fix it?

    Just to make the situation more clear: the website is going to be multilingual (lt, en, ru, fr). I'm not sure if it would have any effect to the solution.
    P.S. I don't want to replace characters in database with HTML char codes...
    ----
    I've just noticed that there is – instead of as well.
  • I don't know much about character encodings but I do know that MySQL is a pain in the arse with them. Is there another DB backend that you could use?
  • Here is what I've got from their support team:

    You must configure the file .htaccess, how to do this can be found on the Internet.

    You can download this file by FTP


    Just an example:

    ___________________________
    AddDefaultCharset utf-August
    RewriteEngine on
    RewriteRule ^ (administrator | css | editor | images | files | js) / - [L]
    RewriteCond% (REQUEST_FILENAME)!-D
    RewriteCond% (REQUEST_FILENAME)!-F
    RewriteRule ^(.*)$ / index.php? Params = $ 1 &% (QUERY_STRING) [L]
    Options-Indexes
    ___________________________

    The file should be put in the root directory


    I'm not advanced on .htaccess (only basics, actually) so here is my question: is there anything else to change but utf-August? and is there a need for those rewrite rules?

    ---- Edited / Solved -----
    Added just one line (AddDefaultCharset UTF-8) and it works for now.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Poll

No poll attached to this discussion.

In this Discussion