how to display a file name correctly when I click open attached fi

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

%>
 
A

Alan Edwards

Please try the IE7 group.
The recommended newsgroup is microsoft.public.internetexplorer.general

In a proper newsreader:
news://msnews.microsoft.com/microsoft.public.internetexplorer.general

If you must use a web interface:
http://www.microsoft.com/communitie...?dg=microsoft.public.internetexplorer.general

....Alan
--
Alan Edwards, MS MVP Windows - Internet Explorer
http://dts-l.com/index.htm

** test spec **
- ASP
- Based on UTF-8
- multilingual file download ( Especially Korean, Japanese, Chinanese etc. )
- IE 7.0
(snip)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top