以文本方式查看主题 - 计算机科学论坛 (http://bbs.xml.org.cn/index.asp) -- 『 XML基础 』 (http://bbs.xml.org.cn/list.asp?boardid=1) ---- xml中html表单如何提交GB2312格式的数据 (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=5621) |
-- 作者:sisyphos -- 发布时间:3/11/2004 7:18:00 PM -- xml中html表单如何提交GB2312格式的数据 有post.xml和post.xsl文件(两个文件的字符都使用了GB2312)。 其中post.xsl文件见下,其中post.xsl文件里用了html表单, 可是等表单提交后发现,所有数据都自动变成是utf-8格式的。 请问如何才能让提交的数据是GB2312的呢?
<xsl:template match="/"> |
-- 作者:jadedrip -- 发布时间:3/12/2004 11:03:00 AM -- 在 xsl 文件中 <head> 中 加入 <meta content="text/html; charset=gb2312" http-equiv="Content-Type"/> 试试 |
-- 作者:sisyphos -- 发布时间:3/13/2004 3:43:00 AM -- 还是不可以啊 |
-- 作者:jadedrip -- 发布时间:3/15/2004 9:50:00 AM -- <?xml version="1.0" encoding="GB2312"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="4.0" encoding="GB2312" indent="yes"/> 那就在用这样的文件头看看,不行的话,用PHP转换代码算了。
|
-- 作者:sisyphos -- 发布时间:3/18/2004 3:48:00 PM -- 不错,果然可以,哈哈,谢谢。。:) |
-- 作者:sisyphos -- 发布时间:3/18/2004 3:57:00 PM -- 查标准函数里没有utf8和gb2312互相转换的代码啊 |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
46.875ms |