Last modified: 2011-03-13 18:04:31 UTC
There is problem to encode using mysql_client_encoding() function in Database.php So save wrong Article/Text everything that written in Korean. PHP Version : 5.1.2 mysql version : mysql Ver 14.7 Distrib 4.1.13, for pc-linux-gnu (i686) using readline 4.3 mysql variables : | character_set_client | euckr | | character_set_connection | euckr | | character_set_database | euckr | | character_set_results | euckr | | character_set_server | euckr | | character_set_system | utf8 | | character_sets_dir | /usr/local/mysql4113/share/mysql/charsets/ | | collation_connection | euckr_korean_ci | | collation_database | euckr_korean_ci | | collation_server | euckr_korean_ci | Like this. ----------------------------------------------------------- before mysql_client_encoding(); ㅋㅋㅋㅋㅋㅋㅋㅋ after mysql_client_encoding(); ㅋ\ㅋㅋ\ㅋㅋ\ㅋㅋ\ㅋ before mysql_client_encoding(); 한글 after mysql_client_encoding(); \한글 ----------------------------------------------------------- as this result. can't find article and save wrong text in database. But with mysql's collation/character_set_encoding is latin1, this is ok work well. i fixed this problem First install with option (for mysql4 or mysql5 using UTF8) And then hange strencode function in Database.php, like this. /** * Wrapper for addslashes() * @param string $s String to be slashed. * @return string slashed string. */ function strencode( $s ) { //return mysql_real_escape_string( $s, $this->mConn ); return addslashes( $s ); }
The "workaround" described above is NOT safe for escaping all data prior to insertion in the database and should not be replicated on other installations without a good reason.
Either you should use the default latin1 encoding, or you should use the UTF-8 schema with UTF-8 client mode enabled on MySQL 4.1 or higher. Nothing else is supported nor will it become supported.