1. HTTP消息头(1)通用信息头即能用于请求消息中,也能用于响应信息中,但与被传输的实体内容没有关系的信息头,如Data,Pragma主要: Cache-Control , Connection , Data , Pragma , Trailer , Transfer-Encoding , Up...
分类:
其他好文 时间:
2014-07-24 21:45:02
阅读次数:
291
Resin升级到3.1.3后,有同事发现原来在Resin 3.0.xx下成功运行的部分jsp文件(输出xml格式文件)编译出错:1234567500 Servlet ExceptionXXXXX.jsp:1: contentType 'text/xml; charset=UTF-8'conflict...
分类:
其他好文 时间:
2014-07-24 21:44:12
阅读次数:
297
前序: 一直对编码很痴迷,让数据一目了然不好吗?为什么要去编码,这不是闲的没事,浪费生产力吗?随着学习的深入,愈加觉得自己无知,世界语言千万种,在互联网的世界里如何表示他们?碰到汉字ASCii就显得苍白无力了,所以,需要更多的字节来表示各种文字,这就需要一个规范;同时,起初编解码的目的是为了数据的安...
分类:
其他好文 时间:
2014-07-24 21:33:32
阅读次数:
193
# encoding:utf-8'''Created on 2014年7月14日@author: caoshouxin'''import osimport reimport os.pathfrom lxml import etreefrom sogou import offdb,docidimpor...
分类:
编程语言 时间:
2014-07-24 17:31:46
阅读次数:
297
public static string Str2Hex(string s) { string result = string.Empty; byte[] arrByte = System.Text.Encoding.GetEncoding("GB2312").GetBytes(s); for(in...
分类:
其他好文 时间:
2014-07-24 09:53:33
阅读次数:
304
直接使用例如:http://www.abc.php?name=中文符 ,客户端调用,在服务端修改后,会出现乱码, 而windows phone 又不能直接支持gb2312, 经过大量分析和验证,发现 凡事 经过”从汉字转换到16进制”后, 即可成功实现转码,代码如下: string text = "...
分类:
其他好文 时间:
2014-07-24 09:52:43
阅读次数:
264
#!/usr/bin/perl -w# 程序代码只是简单说明获取解析网页内容及匹配模式使用的例子,逻辑并不是很严密use utf8;binmode(STDIN, ':encoding(utf8)');binmode(STDOUT, ':encoding(utf8)');binmode(STDERR,...
分类:
Web程序 时间:
2014-07-24 09:46:53
阅读次数:
260
# 使perl程序支持utf8宽字符编码,不添加下面几行打印中文字符时将出现Wide character in print警告或错误。use utf8;binmode(STDIN, ':encoding(utf8)');binmode(STDOUT, ':encoding(utf8)');binmo...
分类:
其他好文 时间:
2014-07-24 05:06:38
阅读次数:
258
TXMLDocumentdomvendor=ADOMXMLv4varroot:IXMLnode;lei:IXMLNode;info:IXMLNode;i:integer;strxml:string;xmldoc:TXMLDocument;begincbbCountry.Items.Clear;trystrxml:=‘<?xmlversion="1.0"encoding="GB2312"?>‘;strxml:=strxml+(httprio1asDataCenterServicesSoap).Get..
分类:
其他好文 时间:
2014-07-23 21:11:06
阅读次数:
224
xml中加入了几条,为了方便查询时作为示例。 话不多说见代码注释: DTD文件:SwordTypeDefinition.dtd <?xml?version="1.0"?encoding="UTF-8"?>
<!ELEMENT?SwordLibrary?(Sword*)>
<!ELEMENT?Sword?(SwordN...
分类:
编程语言 时间:
2014-07-23 17:38:01
阅读次数:
256