By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,087 Members | 1,508 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,087 IT Pros & Developers. It's quick & easy.

Problems opening a file containg , or (swedish characters)

P: n/a
Hi!

I have streamed files to a database and use Response.BinaryWrite to open
them. When the file name contains , or they get replace by for example
å. I have tried changing the CharSet on the Response object but it didn't
solved my problem.
Does anybody know how the fix this problem?

/Henke
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi,

It seems that the text is sent encoded in utf-8 or some other unicode
encoding, but the browser decodes it as ascii. What happens if you change
the encoding in the browser manually? Do you see the text (the characters in
question) ok?

If yes, try setting the Response.Charset to the correct one, for example
"utf-8".

Hope this helps
Martin Dechev
ASP.NET MVP
"Henke" <he********@hotmail.com> wrote in message
news:#C*************@TK2MSFTNGP12.phx.gbl...
Hi!

I have streamed files to a database and use Response.BinaryWrite to open
them. When the file name contains , or they get replace by for example
å. I have tried changing the CharSet on the Response object but it didn't
solved my problem.
Does anybody know how the fix this problem?

/Henke

Nov 18 '05 #2

P: n/a
Thanks for your answer!
I looked i my IE and found out that the encoding was set to UTF-8, so I set
the Response.Charset to "UTF-8" but it didn't help. It's just in the
Download File - dialog that the filename gets wrong. ANy other ideas?

/Henke

"Martin Dechev" <de*******@hotmail.com> skrev i meddelandet
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

It seems that the text is sent encoded in utf-8 or some other unicode
encoding, but the browser decodes it as ascii. What happens if you change
the encoding in the browser manually? Do you see the text (the characters
in
question) ok?

If yes, try setting the Response.Charset to the correct one, for example
"utf-8".

Hope this helps
Martin Dechev
ASP.NET MVP
"Henke" <he********@hotmail.com> wrote in message
news:#C*************@TK2MSFTNGP12.phx.gbl...
Hi!

I have streamed files to a database and use Response.BinaryWrite to open
them. When the file name contains , or they get replace by for
example
å. I have tried changing the CharSet on the Response object but it
didn't
solved my problem.
Does anybody know how the fix this problem?

/Henke


Nov 18 '05 #3

P: n/a
Hi Martin,
I posted my error i had for the trreview control bit u didn't reply..
Can u go through that pls!!
Thx
"Martin Dechev" <de*******@hotmail.com> wrote in message
news:#i**************@TK2MSFTNGP10.phx.gbl...
Hi,

It seems that the text is sent encoded in utf-8 or some other unicode
encoding, but the browser decodes it as ascii. What happens if you change
the encoding in the browser manually? Do you see the text (the characters in question) ok?

If yes, try setting the Response.Charset to the correct one, for example
"utf-8".

Hope this helps
Martin Dechev
ASP.NET MVP
"Henke" <he********@hotmail.com> wrote in message
news:#C*************@TK2MSFTNGP12.phx.gbl...
Hi!

I have streamed files to a database and use Response.BinaryWrite to open
them. When the file name contains , or they get replace by for example å. I have tried changing the CharSet on the Response object but it didn't solved my problem.
Does anybody know how the fix this problem?

/Henke


Nov 18 '05 #4

P: n/a
Hi,

Try to UrlEncode the filename - in the header:

Response.AppendHeader("content-disposition", "attachment; filename=" +
Server.UrlEncode("test with , and .txt"));

Hope this helps
Martin Dechev
ASP.NET MVP
"Henke" <he********@hotmail.com> wrote in message
news:#d**************@TK2MSFTNGP12.phx.gbl...
Thanks for your answer!
I looked i my IE and found out that the encoding was set to UTF-8, so I set the Response.Charset to "UTF-8" but it didn't help. It's just in the
Download File - dialog that the filename gets wrong. ANy other ideas?

/Henke

"Martin Dechev" <de*******@hotmail.com> skrev i meddelandet
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

It seems that the text is sent encoded in utf-8 or some other unicode
encoding, but the browser decodes it as ascii. What happens if you change the encoding in the browser manually? Do you see the text (the characters in
question) ok?

If yes, try setting the Response.Charset to the correct one, for example
"utf-8".

Hope this helps
Martin Dechev
ASP.NET MVP
"Henke" <he********@hotmail.com> wrote in message
news:#C*************@TK2MSFTNGP12.phx.gbl...
Hi!

I have streamed files to a database and use Response.BinaryWrite to open them. When the file name contains , or they get replace by for
example
å. I have tried changing the CharSet on the Response object but it
didn't
solved my problem.
Does anybody know how the fix this problem?

/Henke



Nov 18 '05 #5

P: n/a
Hi Martin!
Thank you verry much, that solved my problem. I doubt I'd found it my self!!

/Henke

"Martin Dechev" <de*******@hotmail.com> skrev i meddelandet
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

Try to UrlEncode the filename - in the header:

Response.AppendHeader("content-disposition", "attachment; filename=" +
Server.UrlEncode("test with , and .txt"));

Hope this helps
Martin Dechev
ASP.NET MVP
"Henke" <he********@hotmail.com> wrote in message
news:#d**************@TK2MSFTNGP12.phx.gbl...
Thanks for your answer!
I looked i my IE and found out that the encoding was set to UTF-8, so I

set
the Response.Charset to "UTF-8" but it didn't help. It's just in the
Download File - dialog that the filename gets wrong. ANy other ideas?

/Henke

"Martin Dechev" <de*******@hotmail.com> skrev i meddelandet
news:%2****************@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> It seems that the text is sent encoded in utf-8 or some other unicode
> encoding, but the browser decodes it as ascii. What happens if you change > the encoding in the browser manually? Do you see the text (the characters > in
> question) ok?
>
> If yes, try setting the Response.Charset to the correct one, for
> example
> "utf-8".
>
> Hope this helps
> Martin Dechev
> ASP.NET MVP
> "Henke" <he********@hotmail.com> wrote in message
> news:#C*************@TK2MSFTNGP12.phx.gbl...
>> Hi!
>>
>> I have streamed files to a database and use Response.BinaryWrite to open >> them. When the file name contains , or they get replace by for
>> example
>> å. I have tried changing the CharSet on the Response object but it
>> didn't
>> solved my problem.
>> Does anybody know how the fix this problem?
>>
>> /Henke
>>
>>
>
>



Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.