Community Support for OpenDocMan (Deprecated)
UTF-charset - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Patches (https://forum.opendocman.com/forum-10.html)
+--- Thread: UTF-charset (/thread-582.html)



UTF-charset - fco - 01-26-2013

Hello.

For if it´s usable for someone.

I had an issue with utf-8 charset in the inserts - select to Mysql database.

I solved this by inserting this line:

mysql_query ("SET NAMES 'utf8'");

this way in odm-init.php:
********************************************
/*
* Connect to Database
*/
$GLOBALS['connection'] = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die ("Unable to connect: " . mysql_error());
mysql_query ("SET NAMES 'utf8'");
$db = mysql_select_db(DB_NAME, $GLOBALS['connection']);

...
...
**************************************************************************