在python中编程导入压缩包,利用zipfile包,从zipinfo读取文件名总是出错,创建的文件名是乱码,写入pgsql更是出错. 但在ubuntu下测试却正常,在windows下测试总是失败. if not hdfs.exists_file_dir(dir): hdfs.make_dir(dir) hdfs.create_file(hpath, zip.read(info)) # There is no official file name encoding for ZIP files.
1.查看文件编码方式--file 文件名(但不是很准确) yang@mint-linux ~ $ file baidu.html baidu.html: HTML document, UTF-8 Unicode text, with very long lines, with no line terminators yang@mint-linux ~ $ file sina.html sina.html: HTML document, ISO-8859 text, with very long
情景描述:最近在做Unity的网络底层,用VS编写源码,MonoDevelop用来Debug,在Flash Builder上搭建的Python做协议生成器,期间有无数次Unity莫名奇妙的的down掉了,然后仔细分析了一下: 1.unity会爆出错误: There are inconsistent line endings in the 'Assets/...cs' script. Some are Mac OS X (UNIX) and some are Windows. This might
转自: http://www.cnblogs.com/sevenyuan/archive/2012/12/06/2805114.html 1.unity会爆出错误: There are inconsistent line endings in the 'Assets/...cs' script. Some are Mac OS X (UNIX) and some are Windows. This might lead to incorrect line numbers in stacktrac