F
flyhammer
** test spec **
- ASP
- Based on UTF-8
- multilingual file download ( Especially Korean, Japanese, Chinanese etc. )
- IE 7.0
Hi~ Guy.
Now I'm just make to download multilingual files(UTF-8) using
Response.BinaryWrite.
Although (Fortunately) I can make a multilingual file download work, I'm
just faced up to an unexpected difficulty.
when I click "open button" to check attached multilingual file although the
filename is shown correctly on the
filedownload dialog, Actually the file name is shown as
%EC%84%B8%EC%9D%BC%EB%9F%AC[1].doc on ms-word. ('Save as'
shows the correct name)
So, I look forward to finding the solution how to be accurately displayed
the filename when I click "open button"
whihout saving.
If you know the mean I wish to know, plese give me some guide to solve this
problem.
Or, any recommnad is accepted any component or web browser to support the
function to be displayed filename
correctly when I open the attached file.
(* Maybe I wonder how to solve this problem by any other Server-side
Language( JSP, ASP.NET etc )
as far as here, it's all my problem.
From now on, I just wait your opinion. thank you~.
Sample Code
================================
<%@ Language=VBScript%>
<%
old_codepage = Session.CodePage
Session.CodePage = "65001"
file = "세ì¼ëŸ¬.doc" '%EC%84%B8%EC%9D%BC%EB%9F%AC[1].doc
encodename = Server.UrlEncode(file)
delimiter = InStrRev(encodename, "%2E")
if delimiter <> 0 then
tempname = Left ( encodename, delimiter - 1 )
temptype = Right ( encodename, Len(encodename) - delimiter - 2 )
encodename = replace( tempname & "." & temptype, "+" ,"%20" )
end if
Response.ContentType = "application/unknown"
Response.AddHeader "Content-Disposition","attachment; filename=" &
encodename
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadFromFile Server.MapPath("./data/")&"\"& file
download = objStream.Read
Response.BinaryWrite download
Set objstream = nothing
%>
- ASP
- Based on UTF-8
- multilingual file download ( Especially Korean, Japanese, Chinanese etc. )
- IE 7.0
Hi~ Guy.
Now I'm just make to download multilingual files(UTF-8) using
Response.BinaryWrite.
Although (Fortunately) I can make a multilingual file download work, I'm
just faced up to an unexpected difficulty.
when I click "open button" to check attached multilingual file although the
filename is shown correctly on the
filedownload dialog, Actually the file name is shown as
%EC%84%B8%EC%9D%BC%EB%9F%AC[1].doc on ms-word. ('Save as'
shows the correct name)
So, I look forward to finding the solution how to be accurately displayed
the filename when I click "open button"
whihout saving.
If you know the mean I wish to know, plese give me some guide to solve this
problem.
Or, any recommnad is accepted any component or web browser to support the
function to be displayed filename
correctly when I open the attached file.
(* Maybe I wonder how to solve this problem by any other Server-side
Language( JSP, ASP.NET etc )
as far as here, it's all my problem.
From now on, I just wait your opinion. thank you~.
Sample Code
================================
<%@ Language=VBScript%>
<%
old_codepage = Session.CodePage
Session.CodePage = "65001"
file = "세ì¼ëŸ¬.doc" '%EC%84%B8%EC%9D%BC%EB%9F%AC[1].doc
encodename = Server.UrlEncode(file)
delimiter = InStrRev(encodename, "%2E")
if delimiter <> 0 then
tempname = Left ( encodename, delimiter - 1 )
temptype = Right ( encodename, Len(encodename) - delimiter - 2 )
encodename = replace( tempname & "." & temptype, "+" ,"%20" )
end if
Response.ContentType = "application/unknown"
Response.AddHeader "Content-Disposition","attachment; filename=" &
encodename
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadFromFile Server.MapPath("./data/")&"\"& file
download = objStream.Read
Response.BinaryWrite download
Set objstream = nothing
%>