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

national character i querystring - problem

P: n/a
Hi

My problem is like that:

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

http://localhost/euroadres/pokazbran...anza=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.
May 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You have to url-encode the value to put it in an url. Use the
Server.UrlEncode method.

Dariusz Tomon wrote:
Hi

My problem is like that:

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

http://localhost/euroadres/pokazbran...anza=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.

May 6 '06 #2

P: n/a

"Göran Andersson" <gu***@guffa.com> wrote in message
news:eh**************@TK2MSFTNGP05.phx.gbl...
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.


Dariusz Tomon wrote:
Hi

My problem is like that:

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

http://localhost/euroadres/pokazbran...anza=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.

May 6 '06 #3

P: n/a
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 Tomon wrote:
"Göran Andersson" <gu***@guffa.com> wrote in message
news:eh**************@TK2MSFTNGP05.phx.gbl...
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.

Dariusz Tomon wrote:
Hi

My problem is like that:

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

http://localhost/euroadres/pokazbran...anza=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.


May 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.