FastRodas Posted April 26, 2004 Posted April 26, 2004 (edited) 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 Edited April 26, 2004 by FastRodas Quote
FastRodas Posted April 28, 2004 Author Posted April 28, 2004 I am doing lots of teste but still without sucess! does anyone out there know how to do this? Quote
bungpeng Posted April 28, 2004 Posted April 28, 2004 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 Quote
FastRodas Posted April 28, 2004 Author Posted April 28, 2004 (edited) 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 Edited April 28, 2004 by FastRodas Quote
iebidan Posted April 28, 2004 Posted April 28, 2004 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 Quote Fat kids are harder to kidnap
FastRodas Posted April 29, 2004 Author Posted April 29, 2004 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!! Quote
bungpeng Posted April 29, 2004 Posted April 29, 2004 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? Quote
Arch4ngel Posted April 29, 2004 Posted April 29, 2004 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 :) Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.