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

Swedish characters

5 Answers 59 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Iron
Kjell asked on 01 Feb 2014, 04:42 PM
There were many questions today.
When i use example DBContentProvider and use Swedish characters like å, ä and ö in a file name it no problem to upload the file.
But I can not open it?
When i click on a filename like "Åland.doc" I go to a page with url: www.MyDomainNam.se/Handler.ashx?path=dokument%2fArbetsledare%2f%c3%85land.doc

I use Collation: Finnish_Swedish_100_CI_AS and MS SQL 2008.
In web.config i use:
<globalization fileEncoding="iso-8859-1" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" culture="sv-SE" uiCulture="sv-SE" />

How can I solve it?

If i use FileExplorer with no DBContentProvider, i have no problem to open file with Swedish characters in the filename...

5 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 04 Feb 2014, 11:16 AM
Hi Kjell,

This is expected behaviour that is not caused by the special character in the file name but due to the type of the file you are trying to open.

The DBContentProvider is using a handler to serve the files to the client and the file types that are not able to be displayed inside the browser (txt, jpg, gif, png, etc) the browser will try to download - the WriteFile() method in the Handler.ashx is handling the way files are served to the browser.

Regards,
Dobromir
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Kjell
Top achievements
Rank 1
Iron
answered on 04 Feb 2014, 04:46 PM
Do not know if I understand you right now.
If I upload a word document with the extension .doc and call it Åland (Swedish characters), then I can not open / download the file.
However if I call the file Aland, I can open / download the file
0
Vessy
Telerik team
answered on 06 Feb 2014, 01:11 PM
Hi Kjell,

What my colleague Dobromir means is that there should not be difference whether you are trying to open a file with or without a special character, as far as they are both with a ".doc" extension. The reason is that the browsers cannot render files of this type, so FileExplorer is also not able to provide such functionality.

The expected behavior for each browser in such scenario will be to prompt you to download the file/open it outside the browser, and this what FileExplorer does - video with DB provider. In case that the control does not behave in this way on your end, could you try to isolate the problem into a sample fully runnable project including all needed references, so we could examine it on our side?

Regards,
Veselina Raykova
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.

0
Kjell
Top achievements
Rank 1
Iron
answered on 06 Feb 2014, 08:24 PM
I found the error. When I deleted the request coding="iso-8859-1" in globalization, it worked to download files with Swedish characters.
Only problem with Internet Explorer, type the file name.
I have try with request coding="UTF-8" however, no difference...
For example, when I download Åland.doc becomes the name à ... land.doc
Will figure out how to get to it ....
0
Vessy
Telerik team
answered on 07 Feb 2014, 04:14 PM
Hi Kjell,

I delved a little bit more into the issue found that the problematic behavior is connected with the encoding made by the Response.Write() method in IE. This issue has been discussed a lot in the web with some workarounds provided. For example, you can start your research from the following threads:
Response.Write - filename encoding wrong in Internet Explorer
ASP.NET - Respose.Write() wrong endcoding

I hope this information will be helpful for you.

Regards,
Veselina Raykova
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
FileExplorer
Asked by
Kjell
Top achievements
Rank 1
Iron
Answers by
Dobromir
Telerik team
Kjell
Top achievements
Rank 1
Iron
Vessy
Telerik team
Share this question
or