Problem with russian text (charset problem)

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problem with russian text (charset problem)

Postby Lex-BY » 19. August 2008 14:46

Hello, everyone, who reads this topic.
At first, I'm from Russia, so I have to apologize for my english - it's not good enough.
Now, the problem. I need to install my site in cp1251 charset (russian language uses it). But after installation i've got the same result with any forum engine or CMS, which I tried. Here is example of what I have in Joomla. There are 2 variants:
  1. If I already have prepared empty base in cp1251 or if I define new database name while setup (forum/CMS installer will automatically create it in cp1251 - so it's the same), then after installation all russian text on site (exept for button names, which, I think, is directly from php) is replaced with question marks (???????). There are questions in database (phpMyAdmin), too.
  2. If I've prepared empty database in utf-8 (_general_ci collation), then, after installation, all text (including russian from MySQL) displays correctly. But the same text in phpMyAdmin displays very strange (like Ëåíòû íîâîñòåé). I create a dump (it's in utf-8, and no way to change). Then fix charsets in dump (save it as cp1252 -> open as cp1251). Russian text becomes normal. I also replace to DEFAULT CHARSET=cp1251 DEFAULT COLLATE=cp1251_general_ci and save the dump back to utf-8 (for correct import). Then import it back to the same database with replace. Russian text now displays correctly in database. But when I enter site - there are the same questions (????). This is what I have now.

When I was installing SMF, I've got the same problem - so I asked a lot of questions in many russian support forums. After that, someone told me to write $db_character_set = 'cp1251'; in SMF settings.php file and following - in MySQL my.cnf file.
Code: Select all
[client]
default-character-set = cp1251
default-collation = cp1251_general_ci

[mysqld]
default-character-set = cp1251
default-collation = cp1251_general_ci
init-connect="SET NAMES cp1251"

[mysql]
default-character-set = cp1251
default-collation = cp1251_general_ci

This text is now in my.cnf. SMF seems to work correctly. But questions was replaced with correct russian text only after adding $db_character_set = 'cp1251';. Other people uses denwer as a server and they don't have this problems, but I still guessing that XAMPP is better, I just need to configure it... somehow to fix the problem. I'm not familiar with php and apache. That's why I tried to describe problem as detailed as I can. Joomla still displays only "?????" instead of russian text. That's why I can't correctly integrate it with SMF.
So, my question. :) How do I need to configure XAMPP to fix this problem? And to be able to simply install other CMS / forum engines in future, without that troubles with MySQL.
Lex-BY
 
Posts: 2
Joined: 13. July 2008 13:10

Re: Problem with russian text (charset problem)

Postby Lex-BY » 19. August 2008 18:46

This is what I have:
Image
And this is what should be:
Image
Please, Help! :(
Lex-BY
 
Posts: 2
Joined: 13. July 2008 13:10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 32 guests