MySQL JDBC Memory Usage on Large ResultSet
MySQL JDBC Memory Usage on Large ResultSet
Friday, August 08, 2008
Wednesday, August 06, 2008
XML-RPC for PHP Library + UTF-8 = love
If you have problems with the XML-RPC for PHP library (http://phpxmlrpc.sourceforge.net/) and UTF-8, please be advised that in xmlrpc.inc you will find the following lines:
// The charset encoding used by the server for received messages and
// by the client for received responses when received charset cannot be determined
// or is not supported
$GLOBALS['xmlrpc_defencoding']='UTF-8';
// The encoding used internally by PHP.
// String values received as xml will be converted to this, and php strings will be converted to xml
// as if having been coded with this
GLOBALS['xmlrpc_internalencoding']='ISO-8859-1';
As you can see, internally everything seems to be converted to ISO-8859-1, no idea why. If you change this to
$GLOBALS['xmlrpc_internalencoding']='UTF-8';
you will be able to use UTF-8 correctly with the library.
If you have problems with the XML-RPC for PHP library (http://phpxmlrpc.sourceforge.net/) and UTF-8, please be advised that in xmlrpc.inc you will find the following lines:
// The charset encoding used by the server for received messages and
// by the client for received responses when received charset cannot be determined
// or is not supported
$GLOBALS['xmlrpc_defencoding']='UTF-8';
// The encoding used internally by PHP.
// String values received as xml will be converted to this, and php strings will be converted to xml
// as if having been coded with this
GLOBALS['xmlrpc_internalencoding']='ISO-8859-1';
As you can see, internally everything seems to be converted to ISO-8859-1, no idea why. If you change this to
$GLOBALS['xmlrpc_internalencoding']='UTF-8';
you will be able to use UTF-8 correctly with the library.
Monday, August 04, 2008
MySQL + PHPMyAdmin + UTF-8 = love
Add the following to the [mysqld] section in /etc/mysql/my.cnf:
character_set_server = utf8
collation_server = utf8_general_ci
default-character-set=utf8
Adding AddDefaultCharset UTF-8 to /etc/apache2/conf.d/charset also helps with some web apps.
Tested on Ubuntu 8.04 Hardy
Add the following to the [mysqld] section in /etc/mysql/my.cnf:
character_set_server = utf8
collation_server = utf8_general_ci
default-character-set=utf8
Adding AddDefaultCharset UTF-8 to /etc/apache2/conf.d/charset also helps with some web apps.
Tested on Ubuntu 8.04 Hardy
Subscribe to:
Posts (Atom)