accentuated character

FastRodas

Freshman
Joined
Apr 14, 2004
Messages
25
Hi to all Xtremers,


i have this URl

ahttp://csp10.link.pt:100/carrinho/CheckEportal.aspx?Name=GUIAS%20ESPIRITUAIS%20PARA%202003%20-%20VenÊncio,%20Agendas%20-%20Arteplural%20Edicoes&id=1498&lang=1

As you can see, i in the query string parameter Name there is a accentuated character (the Ê).

when i run this code

String QUERYSTRING = Request.ServerVariables["QUERY_STRING"];

When an accentuated character is present in the query string it is skipped so i get Venncio instead of VenÊncio.

how can i resolve this?

thx to all
 
Last edited:
If Querystring can't handle it, then you may consider other method to pass your value, like Form Post, cookies, session, viewstate, database... it depends on your needs
 
I cant do that...

i have to pass it through the url. The problem is that i am from Portugal and in my language there are lots of accentuated characters. For example
á, à, ã etc.

and these characters are skipped when i do the QUERYSTRING = Request.ServerVariables["QUERY_STRING"];

i'm a little lost...i tried lots of encoding and none worked. I am thinking that since ASP.NET is server side i could be that the server was not well configurated. But i checked that and it is all PT.

in the web.config i changed the settings to PT

<globalization requestEncoding="any valid encoding string"
responseEncoding="UTF-8"
fileEncoding="UTF-8"
culture="pt-PT"
uiCulture="pt-PT" />


so...if anyone can help i would appreciate it
 
Last edited:
well the bad news for you are that, you can't use non american characters, so you'll have to change the ê for a simple e, just look for a domain with a ñ or a ê, you'll find none.
This is told in the W3C standards for domains
 
Well....i found a solution for my problem. I guess it is not the best way but what the heck!! it works!!

what i do is when i pre-generate my url, before í store it in my database i check it for accentuated characters and change them.

for example if i have an à it is changed to %E1, an é to %E9, etc.

So when i get the query string, before i use it i just have to undo the changes....and voila!!
 
If you want to store that in database, then why still need to pass through querystring? Just use database to keep your data passing, don't you think it is more easier?
 
Can easily be done by looking the System.Web.HttpUtility.Encode........
There's a lot there ! even an UrlEncode... so might want to look at it ?
Things done automaticly are way more funny :)
 
Back
Top