title: Charset issue! Webpage transfer to another server
body: <p>1) I migrated WEB page to another server! From Ms Server 2012/Xampp to Cento7/httpd. On Centos7 Web page contains question marks where should be a special characters "āīūņļš". Web page is built on PHP.</p>
  
  <h2>Old server is running old XAMP installation:</h2>
  
  <ul>
  <li>PHP Version 5.4.27</li>
  <li>5.5.36 - MySQL</li>
  </ul>
  
  <h2>CentOS running:</h2>
  
  <ul>
  <li>apach/httpd</li>
  <li>PHP 7.0.* </li>
  <li>5.5.52-MariaDB</li>
  </ul>
  
  <p>2) Both servers contains files with same encoding and DB tables with same charset colletions and both servers have "Server charset is UTF-8 Unicode (utf8)".</p>
  
  <p>Only difference is "Server connection collation". Old server have "Collation" and CentOS have "utf8_general_ci". </p>
  
  <p>3) I tried:</p>
  
  <ul>
  <li>encode files to utf8</li>
  <li>define utf8 in meta tags</li>
  <li>header('Content-Type: text/html; charset=ISO-8859-1'); and
  header('Content-Type: text/html; charset=utf8');</li>
  <li>mysqli_set_charset($con,"utf8");</li>
  <li>AddDefaultCharset UTF-8 in httpd.conf </li>
  </ul>
  
  <p>I just don't understand, why on one server everything is OK and on another server text contains "?" when files/php code/db is the same! Is there a chance that the httpd doesn't have some module enabled?</p>
  
  <p>And there is one more problem! Some php files and DB tables have different encoding and char collection. I tried change file encoding to UTF8 and it solved problem for static text in php files. Some text in db contains strange characters and db contains lot of information. In some cases mysqli_set_charset($con,"utf8"); works but there ar times when text randomly disappear when mysqli_set_charset is used!</p>