Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
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? –  SPArchaeologist Oct 17 '12 at 7:55
add comment

2 Answers

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

share|improve this answer
    
ok i will, but Request.QueryString should not work regardless of the DB colattion... –  Leonardo Oct 16 '12 at 22:29
    
my collation is the one he recommends in both DBs... PRD and DEV... –  Leonardo Oct 16 '12 at 22:42
add comment
up vote 0 down vote accepted

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...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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