对于此(类)问题: (1)出现UnicodeEncodeError –> 说明是Unicode编码时候的问题; (2) ‘gbk’ codec can’t encode character –> 说明是将Unicode字符编码为GBK时候出现的问题; 此时,往往最大的可能就是,本身Unicode类型 ...
分类:
编程语言 时间:
2017-08-26 19:49:42
阅读次数:
203
In the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also wants to bring this feature to his image retrie ...
分类:
其他好文 时间:
2017-08-26 10:20:34
阅读次数:
178
Save the txt with UTF format and then open the file with f1 = open(path, encoding = 'utf') ...
分类:
其他好文 时间:
2017-08-26 10:19:49
阅读次数:
182
查看静态库.a文件包含的内容用下面的命令解压: [plain] view plain copy print? ar x libgdal.a [plain] view plain copy print? [plain] view plain copy print? 然后就可以查看文件了: [plain ...
分类:
其他好文 时间:
2017-08-26 10:16:46
阅读次数:
283
在windows下面编写python脚本,编码问题很严重。 将网络数据流写入文件时时,我们会遇到几个编码: 1: #encoding='XXX' 这里(也就是python文件第一行的内容)的编码是指该python脚本文件本身的编码,无关紧要。只要XXX和文件本身的编码相同就行了。 比如notepad ...
分类:
编程语言 时间:
2017-08-26 04:56:28
阅读次数:
317
准备和安装 1.到这个路径下下载docker engine: https://get.docker.com/rpm/1.7.1/centos-7/RPMS/x86_64/docker-engine-1.7.1-1.el7.centos.x86_64.rpm 2. 依赖于libcgroup包,可以从h ...
分类:
其他好文 时间:
2017-08-26 04:49:48
阅读次数:
195
最近这段时间一直在用SSM框架做增删改查,突然想把以前还不会用框架的时候,综合百度和各种资料结合API文档抄袭而来的数据层的封装分享给大家。这边先封装一个DButil。 我这个封装就是烂大街的那种,没什么特别。 这里是数据库连接需要的jdbc.properties,我们是通过DButil类的读取pr ...
分类:
数据库 时间:
2017-08-25 21:42:44
阅读次数:
417
s = "图片picture"print chardet.detect(s) for c in s.decode('utf-8'): print c UnicodeEncodeError: 'ascii' codec can't encode character u'\u5728' in posit ...
分类:
Web程序 时间:
2017-08-25 21:04:01
阅读次数:
343
当使用Python编程时,编码问题一直很让人头疼,程序中经常会碰到如下错误提示: UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1: ordinal not in range(128) 这是由于python在 ...
分类:
编程语言 时间:
2017-08-25 21:03:55
阅读次数:
278
Nginx (engine x) 可作为web反向代理服务器。能够代理外部网络上的主机,访问内部网络 1 首先windows下载nginx :http://nginx.org/download/nginx-1.6.2.tar.gz 2 打开nginx.conf,将需要代理文件路径写在root中,端口 ...
分类:
其他好文 时间:
2017-08-25 14:52:59
阅读次数:
160