i have 2 SP 2010 enviroments (Dev and prd)... in a certain webpart i get the value of "param1" in the query string, like: string param1String = Request.QueryString["param1"]

if i pass this url: http:// NameOfServer/myPage?param1=hello world
everthing works fine everywhere... in dev and prd param1String will be "hello world"

now... if i pass this: http:// NameOfServer/myPage?param1=Henry Caçado
(note the 'ç') param1String in the dev enviroment will be 'Henry Caçado' BUT IN !!!PRD!!! it will be 'Henry Ca¶ado' (or some other special char)... ive tried everything... i could not find any solution that works... Ive tryed HttpUtility.UrlEnconde/Decode... SPEncoding.URLEncode/Decode... ive even wrote a Javascript that dynamically set the url...

note that if i encode on the whitespaces " "->"%20" it works fine... but if i encode a special char... no game...

Edit:I just noticed if i SPEncode.UrlEncode this url
http://myServer/_layouts/newsolicitationpage.aspx?rootFolder=itens anexos/default&ForceCompetence=Declaração de Carência
i get a generic "Internet Explorer cannot display the webpage" error

  • 1
    It seem that you tried to encode the url programmatically. Have you had a look to the output of the various encoding functions that you tested? Were the special characters still there?
    – SPArcheon
    Oct 17, 2012 at 7:55

2 Answers 2


Check the collation on your content database and on your database server itself as that could easily cause this. There is a decent explanation here : http://blog.sharepointcookbook.com/2008/09/sql-collation-and-sharepoint-2007.html

  • ok i will, but Request.QueryString should not work regardless of the DB colattion...
    – Leonardo
    Oct 16, 2012 at 22:29
  • my collation is the one he recommends in both DBs... PRD and DEV...
    – Leonardo
    Oct 16, 2012 at 22:42

i could not managed to work around it... so i created an alias field where there are no special chars so i could use the query string...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.