This is a migrated thread and some comments may be shown as answers.

[Solved] Export to IE Save Dialog w/ Garbaled Characters Bug

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jenkmeister
Top achievements
Rank 1
jenkmeister asked on 02 Jul 2009, 12:02 AM
If the filename specified to ExportSettings.Filename contains japanese characters, the Save As... dialog will contain garbage characters for the filename. The issue is limited to IE. I believe the only way to fix this is an update from Telerik since the fix requires changing the code that sets the filename in the header...

The filename when appended as a header needs to be encoded with HttpUtility.UrlEncode. Something like this... 

 

// If it's the IE browser, we need to encode the filename

 

if

 

(HttpContext.Current.Request.UserAgent.IndexOf("; MSIE ") > 0)

 

{

   response.AddHeader(

"Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(file.Name));

 

}

 

else

 

{

 

   // if it's anything else, the browser can handle the extended filename

 

   response.AddHeader(

"Content-Disposition", "attachment; filename=" + file.Name);

 

}


If someone from Telerik could confirm that this is an actual bug and that there isn't another work around, that'd be great.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 03 Jul 2009, 08:38 AM
Hello Sean,

We just finished the implementation of the unicode support for CSV files. We also fixed the issue with the garbled file names under Internet Explorer. You will be able to get an internal build soon after we complete our internal tests.
Latest Internal Builds

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
jenkmeister
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or