473,388 Members | 1,327 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,388 software developers and data experts.

Problems opening a file containg å,ä or ö (swedish characters)

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
5 5195
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Toffe | last post by:
Hi, I've got a problem with regular expressions and strings containing Swedish characters (åäö). I basically have a PHP script that highlights certain words in a text. I found the code...
0
by: Svennglenn | last post by:
Hi ! I'm trying to create a graphical program using Tkinter. The program is supposed to save a string the user defines as a filename. I've made it work with the the first button in the program...
19
by: Svennglenn | last post by:
I'm working on a program that is supposed to save different information to text files. Because the program is in swedish i have to use unicode text for ÅÄÖ letters. When I run the following...
3
by: Zheng Huang | last post by:
Hello, All. I have a UTF-8 resource file which contrains all the translatable strings. when I compile it, I will get "RC : fatal error RC1205 : invalid code page". Here is the command I used: ...
1
by: Fredrik Melin | last post by:
Hi, I get all kind of strange characters when using Response.Write on swedish characters (ÅÄÖ) Like the word PÅ becomes PÃ. What do I need to do to get it to output the correct character to...
6
by: Henke | last post by:
I have a web application that is used to transfer files to and from a database. The files are streamed and stored in the database that is. From one page I can download the files to the client, by...
2
by: Mike | last post by:
Hi, I am new to C and having problems with the following program. Basically I am trying to read some files, loading data structures into memory for latter searching. I am trying to use structres...
0
by: Sladan | last post by:
Im writing a program in C# and i read a xml-file into a dataset with the readXml method. But some of the characters in the xml-file is swedish, (å, ä ,ö). Anyone have any idea how to get the...
34
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.