因为上不了WP的SVN,所以昨天下了一个2.2全新安装之后来做站.安装的时候就出了问题,不能和以前一样直接用./wp-admin/install.php来安装了,而是需要运行index.php来根据wp-config-sample.php来创建一个wp-config.php先.装完之后插了UTW 3.1415926版本.提交中文Tag的时候发现有乱码.根据现象应该发现是编码问题.禁用了UTW,发现文章还是不能提交中文.我检查了一下数据库编码,是没问题的.而且我还装过一个2.1然后升级到2.2版本的wp,也不存在这个问题.想到这个我就试试是不是wp-config.php文件的问题.果然,2.2的配置文件多了一行define(’DB_CHARSET’, ‘utf8′),强制数据库字符编码位utf8,而不是我mysql的默认编码.注释掉这一行,啊,终于完美了.这次WP不知道是怎么想的.
我的wp-config.php
// ** MySQL settings ** //
define('DB_NAME', 't'); // The name of the database
define('DB_USER', 'root'); // Your MySQL username
define('DB_PASSWORD', 'x*X8X*'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
//define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = 'wp_'; // Only numbers, letters, and underscores please!
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');
/* That's all, stop editing! Happy blogging. */
define('ABSPATH', dirname(__FILE__).'/');
require_once(ABSPATH.'wp-settings.php');
?>

专家 紫寒 @ 2007-5-21 11:35:12 说:
TEST下 看错误信息