473,378 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Strange characters displayed in file name - File Download Dialog - IE

I don't know what else to try - In my asp.net app, when the file name has
Windows-1252 characters (like ã and ç), these characters appear, each one,
as two strange characters in the file name label in Internet Explorer File
Download Dialog that is shown when I click a link to download the file. The
file content is being generated on-the-fly using asp.net and the filename is
being passed using a call to Response.AddHeader with the strings
"Content-Disposition" and "attachment; filename=" + filename.

I want the file name to display correctly, as it DOES when I click a link in
a test HTML file that points to a "real" file stored in the system.

I tried setting Response.ContentEncoding but all my atempts were
unsuccessful.
I have also searched the net, specially google groups for an answer but I
couldn't find.

Thank you in advance,

Daniel Cardoso
Nov 18 '05 #1
1 3931
Afer trying a little bit more, I decided to analyze the HTTP response
generated by the server in response to a request to download the file. I
then realized that the special characters were being wrongly represented and
sent to the client. I had to use Server.UrlEncode to encode the file name
appropriately, in addition to setting Response.ContentEncoding, so that the
special symbols were correctly sent to the browser. The problem is now
solved.

Regards,

Daniel Cardoso

"Daniel Cardoso" <so*****@nospam.com> wrote in message
news:uM**************@TK2MSFTNGP09.phx.gbl...
I don't know what else to try - In my asp.net app, when the file name has
Windows-1252 characters (like ã and ç), these characters appear, each one,
as two strange characters in the file name label in Internet Explorer File
Download Dialog that is shown when I click a link to download the file. The file content is being generated on-the-fly using asp.net and the filename is being passed using a call to Response.AddHeader with the strings
"Content-Disposition" and "attachment; filename=" + filename.

I want the file name to display correctly, as it DOES when I click a link in a test HTML file that points to a "real" file stored in the system.

I tried setting Response.ContentEncoding but all my atempts were
unsuccessful.
I have also searched the net, specially google groups for an answer but I
couldn't find.

Thank you in advance,

Daniel Cardoso

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: peetm | last post by:
I'd like to write to a log whenever a visitor to my site downloads a file. So, I'd like the link they click to be to a php 'page' that returns the file. Don't know how to do that! Side...
0
by: Buddy Ackerman | last post by:
I am trying to implment a file download via a link such that when clicked, instead of starting the default application for that type of file the user will be presented with a download dialog...
7
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
4
by: Carolina | last post by:
Hi! I have this C# code in a Button_Click event procedure: string FilePath = MapPath("diseño.doc"); Response.ContentType = "Application/msword"; Response.AppendHeader("content-disposition",...
2
by: Ken Varn | last post by:
I have an ASP.NET page that incorporates the following code on a button press. private void DownloadTag_Command(object sender, CommandEventArgs e) { FileStream fs; String Filename; Filename...
4
by: Jonny | last post by:
Hello Group How do I open a Save File Dialog from an ASPX page behind a browse button? Any help would be fantastic!! I am using ASP.NET 1.1 using VB.NET as the coding language TIA
3
by: Shilpa | last post by:
Hi, I have a OpenFileDialog on my windows form whose filter is *.*. I want the users to be able to further filter the files by giving *.doc or *.zip etc in the "file name" field of the dialog...
0
by: Ibrahim. | last post by:
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...
1
by: Blackstar | last post by:
I have a website I am trying to download a file from. This website is strange in the fact that there is no direct link to the URL of the file. The way the site works is as follows: 1) Enter in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.