I'm using a php page in vbulletin. I used some code to get and send data to database. this is my code:
$result =$vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "questions");
but result don't support rtl languages. it put all my character as question sign. how can I define charset in vbulletin php page.
You can set charset in includes/config.php
file:
$config['Mysqli']['charset'] = 'utf8';
Editing the Core config.php File docs:
If you need to set the default connection charset because your database is using a charset other than latin1, you can set the charset here. If you don't set the charset to be the same as your database, you may receive collation errors. Ignore this setting unless you are sure you need to use it.