mysql dbi utf8乱码问题
来源:互联网 发布:js prompt怎么取消判断 编辑:程序博客网 时间:2024/06/08 14:05
<pre name="code" class="python">jrhdpt02:/root/sbin# cat t1.pl #!/usr/bin/perl use DBI; $user="root"; $passwd="xxxxx"; $dbh=""; $dbh = DBI->connect("dbi:mysql:database=zjzc;host=127.0.0.1;port=3306",$user,$passwd) or die "can't connect to database ". DBI-errstr; #$dbh->do("SET NAMES utf8"); $sth=$dbh->prepare("select sn,duration,name,maxUnit,addUnit,productType from zjzc.Product where sn in (263,121,122);"); $sth->execute; while (@recs=$sth->fetchrow_array) { foreach (@recs) {print "$_"} print "\n"; } $dbh->disconnect; jrhdpt02:/root/sbin# perl t1.pl 12123??-??30?25000001112222????-????5170000100003263180????-????2000000100003jrhdpt02:/root/sbin# cat t1.pl #!/usr/bin/perl use DBI; $user="root"; $passwd="R00t,uHagt.0511"; $dbh=""; $dbh = DBI->connect("dbi:mysql:database=zjzc;host=127.0.0.1;port=3306",$user,$passwd) or die "can't connect to database ". DBI-errstr; $dbh->do("SET NAMES utf8"); $sth=$dbh->prepare("select sn,duration,name,maxUnit,addUnit,productType from zjzc.Product where sn in (263,121,122);"); $sth->execute; while (@recs=$sth->fetchrow_array) { foreach (@recs) {print "$_"} print "\n"; } $dbh->disconnect; jrhdpt02:/root/sbin# perl t1.pl 12123中均-至信30号25000001112222中均尊享-贰拾壹号5170000100003263180中均尊享-玖拾伍号2000000100003
0 0
- mysql dbi utf8乱码问题
- perl 解决mysql utf8中文乱码 问题
- mysql乱码 utf8
- Mysql UTF8 解决乱码
- MySql utf8乱码解决
- mysql的utf8乱码
- hibernate+struts+mysql有关utf8乱码问题的解决。
- PHP MYSQL乱码问题,使用SET NAMES utf8校正
- MySQL终极配置解决UTF8编码出现的乱码问题
- asp+mysql+utf8 网页出现乱码的问题
- MySQL终极配置解决UTF8编码出现的乱码问题
- MySQL终极配置解决UTF8编码出现的乱码问题
- mysql 修改server characterset latin1为 utf8(乱码问题)
- mysql 导入导出数据库中文乱码问题 latin1 utf8 utf8_unicode_ci
- MySQL终极配置解决UTF8编码出现的乱码问题
- mysql 5.5 乱码问题,永久修改为utf8编码
- sqoop导出到mysql中文乱码问题总结、utf8、gbk
- 解决mysql存取utf8乱码
- 根据老师编号,统计其所授课程的平均成绩及学生人数。
- python urlencode
- power designer 提示Could not Initialize JavaVM! 的解决方法
- JavaScript之 ------ 一些常用的对象
- HTTP1.1中CHUNKED编码解析
- mysql dbi utf8乱码问题
- Java多线程(二)synchronized wait notify
- iOS开发~CocoaPods使用详细说明
- FreeBSD中配置FTP
- 在Linux中让echo命令显示带颜色的字
- Struts框架学习01
- C语言中“指针”作为“函数参数”时的注意事项
- FileReader对象使用
- 使用jqueryMobile的一些问题