PC Review


Reply
Thread Tools Rate Thread

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

 
 
flyhammer
Guest
Posts: n/a
 
      20th Jan 2009
** 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

%>
 
Reply With Quote
 
 
 
 
Alan Edwards
Guest
Posts: n/a
 
      20th Jan 2009
Please try the IE7 group.
The recommended newsgroup is microsoft.public.internetexplorer.general

In a proper newsreader:
news://msnews.microsoft.com/microsof...plorer.general

If you must use a web interface:
http://www.microsoft.com/communities...plorer.general

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

On Mon, 19 Jan 2009 20:36:00 -0800, in
microsoft.public.windows.inetexplorer.ie6.browser, flyhammer
<(E-Mail Removed)> wrote:

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

(snip)
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
open attached pdf get error message wasn't correctly decoded =?Utf-8?B?U2FuIERpZWdv?= Microsoft Outlook Discussion 3 24th Aug 2011 04:07 AM
Attached Word docs open in Reading Layout View when I double-click =?Utf-8?B?RGViYmll?= Microsoft Outlook Discussion 0 31st Oct 2006 05:04 PM
How to send a file attached to a form when I click a button =?Utf-8?B?ZmlmaQ==?= Microsoft Access 0 23rd Nov 2005 06:16 PM
Custom Form will not open correctly if attached in Outlook 2003 with Exchange 2003 =?Utf-8?B?QnJpYW4gUmVldmVz?= Microsoft Outlook Form Programming 2 24th Mar 2004 11:16 PM
double click doesn't open the file// instead file->open->...the file open norma nks Microsoft Word New Users 1 3rd Oct 2003 03:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:31 PM.