大众世界 world of demotic + 社区新动力

 找回密码
 注册会员
搜索
查看: 2582|回复: 0

[ASP/ASPX] asp Server.URLEncode 解决生成utf-8文件时,文件名为乱码的问题

[复制链接]
发表于 2013-11-26 14:43:18 | 显示全部楼层 |阅读模式
当asp所有的文件编码为uft-8时,通过动态生成的  例子.doc 文件,名称不能正常显示。通过

[Visual Basic] 纯文本查看 复制代码
dim pageObj:pageObj=Array("地区-"&kzjmcName&"档案资料")

'Response.ContentType = "application/octet-stream"
Response.AddHeader "Content-Type", "application/vnd.ms-excel;charset=utf-8;"
Response.AddHeader "Content-Disposition", "attachment; filename="&Server.URLEncode(pageObj(0))&".xls"
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Archiver|手机版|小黑屋|Wod Inc. ( 蜀ICP备20000008号-8

GMT+8, 2024-5-13 00:30 , Processed in 0.107926 second(s), 33 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表