473,548 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.AddHea der 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.Conten tEncoding 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 3938
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.UrlEncod e to encode the file name
appropriately, in addition to setting Response.Conten tEncoding, 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******** ******@TK2MSFTN GP09.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.AddHea der 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.Conten tEncoding 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
5817
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 Question ... Presumably, the dialog that you see when you download a binary (asking for a 'Save As...' file name) is put up by your browser when it...
0
1819
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 window. Well, thanks to Steve Orr, I have that working. However, I still have a few issues. First, the download dialog does not have the name of the...
7
3689
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 satisfactory answer (check your browser) so now that I've had the time to set up a reasonable little test that I can post somewhere, I'll try again....
4
2451
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", "attachment;filename=" + "diseño.doc"); Response.WriteFile(FilePath); Response.Flush();
2
1650
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 = MapPath(e.CommandArgument as string); // Name of file is passed in cmd arg.
4
6247
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
4806
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 (Just like it happens in the open file dialog of MS Word) Currently, if the user enters a wild card character in the file name field, it is throwing...
0
1316
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 myFilePathDetach() As String = Split(Request.QueryString("link"), "/") Dim myFilePath As String =
1
1888
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 search criteria 2) Click on Download button to go to download page 3) Click on Download button on Download page 4) Server sends 2 bits of data to...
0
7438
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6036
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3495
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
751
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.