<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_Fred Xu的技术博客_分类_NHibernate/Fluent NHibernate</title><id>http://feed.cnblogs.com/blog/u/43880/category/314474/rss</id><updated>2012-05-27T12:42:14Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/Fred_Xu/category/314474.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/43880/category/314474/rss"/><entry><id>http://www.cnblogs.com/Fred_Xu/archive/2012/03/08/fluent-nhibernate_mysql-insert-record-messy-code.html</id><title type="text">Fluent NHibernate+MySQL插入数据中文乱码问题</title><summary type="text">一．环境准备：1. 安装.NETFrameWork 4.02. 安装MySQL 5.0.xwww.mysql.com3. 安装Mysqlconnectorfor.Net1.0www.mysql.com二．问题描述：如题三．问题分析：Mysql从4.1以后开始支持多编码。用因为MySQL是瑞典人开发的，所以安装MySQL默然是latin1。而我们中文操作系统环境下用到的默认是GB2312.这样我们不管在查询数据库中文数据时，数据库转换字符时就会出现混乱。四．问题解决：通一数据库表和字段使用utf8字符集。具体方法：1) 在创建数据表时，先执行如下语句：setcharacter_...</summary><published>2012-03-08T13:11:00Z</published><updated>2012-03-08T13:11:00Z</updated><author><name>Fred_Xu</name><uri>http://www.cnblogs.com/Fred_Xu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/Fred_Xu/archive/2012/03/08/fluent-nhibernate_mysql-insert-record-messy-code.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/Fred_Xu/archive/2012/03/08/fluent-nhibernate_mysql-insert-record-messy-code.html"/><content type="html"/></entry></feed>
