FCKeditor 2.3 上传出现乱码解决方法(asp版)

[ 2007-11-04 07:08:40 | Author: zhenhua ]
Font Size: Large | Medium | Small
1) 快速上传,即"上传"标签页,上传成功之后弹出的对话框为乱码,(文件名重复时会弹出这个对话框)

(2) 快速上传后返回到"链接"页后,"链接"页的输入框为乱码

(3) 文件"浏览"上传之后弹出的对话框为乱码.(同1)

(4) 文件"浏览"上传保存的文件名为乱码

解决方法:

步骤1.

将 \Fckeditor\editor\filemanager\browser\default\frmupload.html 文件的编码(原先为ANSI编码)改为UTF-8保存即可,

打开该文件 >> 另存为 >> 点“保存”按钮右边的下拉箭头 >> 编码保存... >> 替换原文件 >> Unicode(UTF-8有签名)

或者

在\FCKeditor\editor\filemanager\browser\default\frmupload.html)加上一段
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

该方法解决了(4)所述的乱码现象.

步骤2.

找到\FCKeditor\editor\filemanager\browser\default\connectors\asp\command.asp中的下面文字:
 Response.Clear
 Response.Write "<script type=""text/javascript"">"
 Response.Write "window.parent.frames['frmUpload'].OnUploadCompleted(" & sErrorNumber & ",'" & Replace( sFileName, "'", "'" ) & "') ;"
 Response.Write "</script>"
在response.clear之后插入
  Response.CodePage=65001
  Response.Charset="UTF-8"
修改后的文字为:

Response.Clear
 Response.CodePage=65001 '<----新增加的行
 Response.Charset="UTF-8" '<----新增加的行
 Response.Write "<script type=""text/javascript"">"
 Response.Write "window.parent.frames['frmUpload'].OnUploadCompleted(" & sErrorNumber & ",'" & Replace( sFileName, "'", "'" ) & "') ;"
 Response.Write "</script>"
该方法解决了(3)所述乱码现象.

同样,找到\FCKeditor\editor\filemanager\upload\asp\upload.asp中的SendResults函数,在该函数的起始处加入
  Response.CodePage=65001
  Response.Charset="UTF-8"
两行.修改后的函数为:
Function SendResults( errorNumber, fileUrl, fileName, customMsg )
 Response.CodePage=65001 '<----新增加的行
 Response.Charset="UTF-8" '<----新增加的行
 Response.Write "<script type=""text/javascript"">"
 Response.Write "window.parent.OnUploadCompleted(" & errorNumber & ",""" & Replace( fileUrl, """", """" ) & """,""" & Replace( fileName, """", """" ) & """,""" & Replace( customMsg , """", """" ) & """) ;"
 Response.Write "</script>"
 Response.End
End Function
该方法解决了(1)(2)所述乱码现象.

步骤2是基于http://www.7dspace.com/doc/23/0601/200612207304425461.htm所述得出的解决方法.

(itti原创)
Comments Feed Comments Feed: http://www.zhenhua.org/feed.asp?q=comment&id=499
UTF-8 Encoding Trackback URL: http://www.zhenhua.org/trackback.asp?id=499

View Mode: Show All | Comments: 0 | Trackbacks: 4 | Toggle Order | Views: 24935
1
Trackback http://fishermansarmsgolant.co.uk/?alt_id=6c2f3
[ http://fishermansarmsgolant.co.uk/?alt_id=6c2f3 | 2014-10-18 04:11:25 ]
"my organization is too hot however your lawn and I believe that a family online was in a top shape.
Trackback http://www.swghc.org/templates/protostar/book2/book2.php?2166lv
[ http://www.swghc.org/templates/protostar/book2/book2.php?2166lv | 2014-11-13 08:41:58 ]
previously comparable to talking with an angel,
Trackback fun animal games
[ fun animal games | 2014-11-16 23:16:56 ]
FCKeditor 2.3 上传出现乱码解决方法(asp版) - 振华博客
Trackback magnetic messaging program
[ magnetic messaging program | 2014-12-04 21:02:22 ]
FCKeditor 2.3 上传出现乱码解决方法(asp版) - 振华博客
1

If you feel this site you find this information helpful, please click on the donation, which is voluntary,Thank you.
Post Comment
Smilies
[arrow] [biggrin] [confused] [cool]
[cry] [eek] [evil] [exclaim]
[frown] [idea] [lol] [mad]
[mrgreen] [neutral] [question] [razz]
[redface] [rolleyes] [sad] [smile]
[surprised] [twisted] [wink]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code