Mysql入库汉字被截断有关问题

WBOY
Release: 2016-06-13 12:50:27
Original
993 people have browsed it

Mysql入库汉字被截断问题

本帖最后由 Suvion 于 2013-03-10 22:54:12 编辑 比如我在文本框输入“公园约会你懂的,”或者“我要上传媒大学”,那么最近写入数据库的是“公园约会”或者“我要上”,已经检查数据库正路字段,都是 utf8_general_ci。



补充说明:将内容输入到Title中,可以完整入库,不会被截断

我在本地用APMServ5.2.6假设环境测试没有这种问题,

本地环境
PHP版本: 5.2.6
MySQL版本: 5.1.28-rc-community
操作系统 Windows NT R780 6.1 build 7600

服务器环境: 出现被截断问题
PHP版本: 5.3.6
MySQL版本: 5.0.96-log
操作系统 Windows NT P3NW8SH241 6.0 build 6002 (Windows Server 2008 Standard Edition Service Pack 2) i586

补充:
经过测试,将body字段的整理改成gb2312_chinese_ci或者Gbk 就不会出现截断的问题,前台会显示,但显示的是“?? 媒  ?? 懂得 ”,请大家帮忙指点迷津
mysql 截断
------解决方案--------------------
编码问题先解决吧~
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!