0

Plugin Used : http://www.tinybutstrong.com/plugins.php Russian characters are not displaying correctly.
In mysql database they are stored correctly collation is utf8_general_ci.

I used define('OPENTBS_ALREADY_UTF8','already_utf8');

Skrol29
  • 5,402
  • 1
  • 20
  • 25

1 Answers1

2

It looks like an UTF-8 problem.

You have to check that all the data chain is UTF-8 :

  • all your PHP scripts
  • the data injected in the template (usually a database), but you also have to check that your PHP script retrieve the data as UTF8. See « How do I make MySQL return UTF-8? »
  • the template (it is actually UTF8 since it is a LibreOffice or Ms Office template)

Since this chain is ok, you have to use the OPENTBS_ALREADY_UTF8 option to load the template.

$TBS->LoadTemplate('my_template.odt', OPENTBS_ALREADY_UTF8);

You can check that you chain is ok by a test like this :

echo "<!doctype html><html><head><title>Test</title><meta charset='UTF-8'></head><body>";
echo $my_data_from_database;
echo "</body></html>";
exit;

where $my_data_from_database is a data item retrieve from the database and that contains special characters like Russian characters.

Skrol29
  • 5,402
  • 1
  • 20
  • 25