national character i querystring - problem

D

Dariusz Tomon

Hi

My problem is like that:

I'm trying to pass values branza and jezyk in querysting:

http://localhost/euroadres/pokazbranza.aspx?branza=transport
lotniczy&jezyk=1

Branza is type "string" and when I'm passing string value without national
characters it's working ok. When I'm trying to pass value with national
characters (multinational not only polish) it's not working properly.
I debugged it and it occured that "multinational" characters are ingnored or
substituted for another characters.
My codepage: 65001 (UTF-8 with signature)

Have you got any idea?

Best Regards

Darek T.
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

You have to url-encode the value to put it in an url. Use the
Server.UrlEncode method.
 
D

Dariusz Tomon

Göran Andersson said:
You have to url-encode the value to put it in an url. Use the
Server.UrlEncode method.

It does not work or I did not understand.
I'm passing values by entering the string with "?" marks with values
assigned. Then I'm trying to retrieve value of "branza" and I tried like
this:
Server.UrlDecode(Request.QueryString["branza"]) and

Server.UrlEncode(Request.QueryString["branza"])

I cannot encode my entering string because it is www adres as it is - for
users to enter it just to browser and then my code underneath will generate
page depending on the values passed.

So the problem still exists :(

Regards

Darek T.
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

UrlEncode should be used when creating the URL.

If the URL is not correctly encoded in the request, there is nothing you
can do to correct it when it arrives at the server side.

Although it might be possible that the browser encodes the characters
correclty, but they are decoded incorrectly when the request arrives.
Check the RequestEncoding property in web.config.

Are you really expecting your users to type in the URL and modify the
querystring? Are they aware of how to write things in an URL, basic
things like that they have to encode spaces?


Dariusz said:
Göran Andersson said:
You have to url-encode the value to put it in an url. Use the
Server.UrlEncode method.

It does not work or I did not understand.
I'm passing values by entering the string with "?" marks with values
assigned. Then I'm trying to retrieve value of "branza" and I tried like
this:
Server.UrlDecode(Request.QueryString["branza"]) and

Server.UrlEncode(Request.QueryString["branza"])

I cannot encode my entering string because it is www adres as it is - for
users to enter it just to browser and then my code underneath will generate
page depending on the values passed.

So the problem still exists :(

Regards

Darek T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top