1

I'm passing query string parameter to .aspx page with 'Ñ' character in value. But Request.QueryString returns some other box '[]' character in return. I think this request encoding issue. and I do not want to use that HttpUtility.UrlDecode and HttpUtility.UrlEncode methods.

Does anyone know how to solve this?

1
  • Why don't you want to use HttpUtility.UrlDecode and HttpUtility.UrlEncode ? This is exactly what they are for. Commented Mar 27, 2010 at 10:49

4 Answers 4

3

You'll have to be a little more precise as how you are passing this parameter and where does it come from but you could set request and response encoding in your web.config file:

<system.web>
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
Sign up to request clarification or add additional context in comments.

Comments

0

You should look Base 64 encoding scheme to solve this problem.

Comments

0

Are you sure it's a different character? It could be that the 'Ñ' isn't representable in whatever font the IDE is using to inspect it (assuming that's where you're seeing the "box").

1 Comment

I'm sure that it is a different char. as it return false when i perform a string comparision
0

Solved. 'N' with Tilde => 'Ñ' comes under ISO-8859-1

Use following under web.config

<system.web> 
    <globalization requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" /> 
</system.web> 

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.