Click to See Complete Forum and Search --> : encoding


Slanter
03-12-2006, 05:40 PM
Hi!
Im having trouble with links to documents.
I have the name of the documents stored in a database. The names can be in swedish with swedish characters and spaces and so on.
In my application I get the name from a database and then I do a response.redirect to the document.
This works fine most of the time but when the name contains spaces or swedish characters it doesnt work.
The characterset that probably will work is unicode/UTF-8 but how will I get this on the response redirect? I have tryied response.character = "UTF-8" but that doesnt work.

Can someone please help me with this? Im sort of new to .NET so my skill isnt the best. Oh, its VB .NET just so u know...

/Slanter

gavinharriss
03-17-2006, 05:42 PM
Have you tried encoding the filename before adding it to the end of your url?

For example:

strFilename = Server.UrlEncode(strFilename)
Response.Redirect(strRoot & strFilename)

Let me know if this works for you.