<![CDATA[ Incorrect cyrillic characters display when moved on the web server - My Forums]]> https://forums.modx.com/thread/?thread=57054 <![CDATA[Re: Incorrect cyrillic characters display when moved on the web server]]> https://forums.modx.com/thread/57054/incorrect-cyrillic-characters-display-when-moved-on-the-web-server#dis-post-334612 Quote from: Mokkacuka at May 30, 2007, 10:19 AM

Hello,

As I can’t understand russian yet (but work with russian text contents on MODx), maybe you already solved my problem in previous posts.

I worked perfectly with russian contents on my laptop with a local installation of MODx.

When moved to the final online server all cyrillic characters display like this : huh??

The data base encoding seems to be set exactly like my local data base.

Do you have any clue ?

Thanks a lot,

Greg

Hello, Mokkacuka!
What encoding do you use in MODx database? I recommend you to use UTF-8 for multilanguage website.
If you can understand anything in Russian I solved the problem with encoding in database here http://modxcms.com/forums/index.php/topic,4422.0.html about a year ago. And I have no problems with encoding now.
Also you need to check default PHP encoding on both servers (local and remote). It should match.]]>
suhinin Aug 07, 2007, 08:41 AM https://forums.modx.com/thread/57054/incorrect-cyrillic-characters-display-when-moved-on-the-web-server#dis-post-334612
<![CDATA[Re: Incorrect cyrillic characters display when moved on the web server]]> https://forums.modx.com/thread/57054/incorrect-cyrillic-characters-display-when-moved-on-the-web-server#dis-post-334611
I had the same problem.

in local host i had denver which had a connection to database in windows 1252

so every time I upload sql dump to remote server I first reconvert it from windows1252 to utf-8

in remote server i have collation set to UTF-8

everything works fine

here is the reconversion script

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Hello!</title>
</head>

<body>

<?php
$input = $_GET['file'];
print_r('working with'.$input.'<br/><br/>');


//$char='z:/charset.txt';
if (file_exists($input)) {$text=file_get_contents($input);


error_reporting(1);

$text=mb_convert_encoding($text,"windows-1252","UTF-8");
file_put_contents($input.'.sql',$text);
}

?>

</body>

</html>


supply it original sql and it will return you converted

move.php?file=z:\modx_2007-07-30_23-21.sql

returns z:\modx_2007-07-30_23-21.sql.sql

first check]]>
danielsl Jul 30, 2007, 02:49 PM https://forums.modx.com/thread/57054/incorrect-cyrillic-characters-display-when-moved-on-the-web-server#dis-post-334611
<![CDATA[Re: Incorrect cyrillic characters display when moved on the web server]]> https://forums.modx.com/thread/57054/incorrect-cyrillic-characters-display-when-moved-on-the-web-server#dis-post-334610 - double check the db connection collation first.
- set the site/manager encode to your language default charset.
- open the config.inc.php file under manager\includes to see whether it uses the right configuration for db.
FYI:
$database_connection_charset
]]>
motsmart May 30, 2007, 03:03 PM https://forums.modx.com/thread/57054/incorrect-cyrillic-characters-display-when-moved-on-the-web-server#dis-post-334610
<![CDATA[Incorrect cyrillic characters display when moved on the web server]]> https://forums.modx.com/thread/57054/incorrect-cyrillic-characters-display-when-moved-on-the-web-server#dis-post-334609
As I can’t understand russian yet (but work with russian text contents on MODx), maybe you already solved my problem in previous posts.

I worked perfectly with russian contents on my laptop with a local installation of MODx.

When moved to the final online server all cyrillic characters display like this : huh??

The data base encoding seems to be set exactly like my local data base.

Do you have any clue ?

Thanks a lot,

Greg]]>
Mokkacuka May 30, 2007, 05:19 AM https://forums.modx.com/thread/57054/incorrect-cyrillic-characters-display-when-moved-on-the-web-server#dis-post-334609