File name is displayed Garbled in "File download dialog box"

G

Guest

Hello,

The problem I'm facing is that the file name that is displayed in File
download diaglog of web page displays garbled.

The file name is japanese. English names works fine.


Dim myFilePathDetach() As String = Split(Request.QueryString("link"), "/")
Dim myFilePath As String =
System.Configuration.ConfigurationManager.AppSettings("UploadFolder").ToString & "\" & myFilePathDetach(1).ToString
Dim myFileInfo As New FileInfo(myFilePath)

HttpContext.Current.Response.ClearContent()
httpContext.Current.Response.ClearHeaders()

'Response.ContentType = "application/pdf"
HttpContext.Current.Response.AppendHeader("content-type",
"application/pdf")
HttpContext.Current.Response.AppendHeader("content-disposition",
"attachment;filename=" & myFileInfo.Name)
HttpContext.Current.Response.AppendHeader("content-length",
myFileInfo.Length)
Response.WriteFile(myFilePath)

response.end()

Any help would be great use.

Thanks,
 

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

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top