码迷,mamicode.com
首页 >  
搜索关键字:utf8    ( 5188个结果
Java读取TXT文本
public String readTxtFile(String filePath) { StringBuffer appInfolistInput = new StringBuffer(); try { String encoding = "UTF8"; File file = new...
分类:编程语言   时间:2014-09-25 11:54:18    阅读次数:147
html/php/mysql乱码
1. html通过jquery的ajax传递数据给php。encodeURI("my.php?name=博客园")2. php接受urldecode($_GET["name"]);3 .mysql5.6编码设置为utf8[mysqld]default-character-set=utf8ok!
分类:数据库   时间:2014-09-25 00:00:37    阅读次数:287
EclipsePHP Studio 常用设置笔记
工作需要,学习PHP使用EclipsePHP Studio开发工具,习惯整理下常用的使用设置,分享一下吧:1、窗口-首选项-常规-工作空间,把文本文件编码改为utf8,以后再新建文件就默认是utf8了。2、窗口-首选项-PHPeclipse Web Development-PHP-Code Assi...
分类:Web程序   时间:2014-09-24 20:06:47    阅读次数:312
python3.4 pymysql插入数据
import?pymysql conn?=?pymysql.connect(host=‘localhost‘,?port=3306,user=‘root‘,passwd=‘root‘,db=‘DeliveryAddress‘,charset=‘UTF8‘) cur?=?conn.cursor() cur.execute("INSERT?INTO?`ProvinceCityCo...
分类:数据库   时间:2014-09-24 05:59:06    阅读次数:322
my first python
#!/usr/bin/python # -*- coding:utf8 -*- import os import re def swap(path, a, b): print path file = open(path, "r").read() file = re.sub(a,b,file) #pr...
分类:编程语言   时间:2014-09-23 22:42:45    阅读次数:198
pugixml使用教程
pugixml介绍 pugixml是一个高性能、轻量级并且简单易用的xml解析库,支持UTF8 encoding、Little-endian UTF16、Big-endian UTF16、UTF16 with native endianness、Little-endianUTF32、Big-endi...
分类:其他好文   时间:2014-09-23 20:57:15    阅读次数:307
关于cocos2dx中文转UTF8码的解决方案
转载请注明出处:帘卷西风的专栏(http://blog.csdn.net/ljxfblog) cocos2dx支持中文显示,只要将中文字符转换成UTF-8字符集就可以正常显示,不过在实践上还是会出现很多问题会困扰开发者。 通常来说,目前的解决方案有以下几种: 1、把代码文件(.h/.cpp/.lua等)的文件编码格式改成UTF-8格式即可,这对于单机游戏来说是很好的解决方案。但是对于服务器传过来的...
分类:其他好文   时间:2014-09-23 14:15:34    阅读次数:187
小爬虫,抓取某贴吧内所有帖子的图片
#!/usr/bin/env python#-*- coding:utf8 -*-import sysreload(sys)sys.setdefaultencoding('gbk')import urllib,urllib2import refrom bs4 import BeautifulSoup...
分类:其他好文   时间:2014-09-23 13:35:14    阅读次数:194
MySQLdb里insert一个带中文的内容
conn = MySQLdb.connect(db="my",user="root", passwd="ggg",use_unicode=1, charset='utf8')cursor = conn.cursor()query = "insert into ewyu(gg,ff) value...
分类:数据库   时间:2014-09-23 12:50:04    阅读次数:267
mysql支持IOS的Emoji表情
原因:UTF-8编码有可能是两个、三个、四个字节。Emoji表情是4个字节,而Mysql的utf8编码最多3个字节,所以数据插不进去。解决办法:将Mysql的编码从utf8转换成utf8mb4步骤:1.修改mysql配置文件 my.inidefault-character-set=utf8mb4ch...
分类:移动开发   时间:2014-09-22 23:37:03    阅读次数:415
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!