473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem with special characters in Request Params

Hi,

I have a situation on an ASP.NET page on which I do a simple
Response.Write(Request.Params["x"]).

The problem is that when the parameters include special characters like
ä or é they are removed. For example, the string 'aéx' becomes 'ax'.

It is the same for both GET or POST and the problem is not in
Response.Write becuse the same thing happens if I use the string in a
database call.

What is wrong?

/Mikael
Nov 18 '05 #1
2 3414
Have you tried setting it to use unicode?
Here's more info on the subject:
http://msdn.microsoft.com/library/de...gbasetypes.asp

Also, you might adjust the Globalization section of your web.config.
Try changing it to something more like this:

<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
<globalization
fileEncoding="iso-8859-1"
requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1"
/>
</system.web>
</configuration>

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Mikael Engdahl" <mi*******************@engdahl.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a situation on an ASP.NET page on which I do a simple
Response.Write(Request.Params["x"]).

The problem is that when the parameters include special characters like
ä or é they are removed. For example, the string 'aéx' becomes 'ax'.

It is the same for both GET or POST and the problem is not in
Response.Write becuse the same thing happens if I use the string in a
database call.

What is wrong?

/Mikael

Nov 18 '05 #2
Hello Mikael,
The problem is that when the parameters include special characters
like ä or é they are removed. For example, the string 'aéx' becomes
'ax'.


Are you doing a Server.UrlEncode to the parameter values prior to appending them to the querystring?

--
Matt Berther
http://www.mattberther.com
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: scummer | last post by:
Hi, I am having a problem with the httplib HTTPConnection object. While I can easily send requests that don't have any payload (ie. "get"), I encounter issues if I want to post xml data. If you...
3
by: Chris Mantoulidis | last post by:
I posted this here one day ago but it seems like it hasn't been put up for some unknown reason. That gives me a chance to say things a bit better in this post. 1st of all let's desribe the...
0
by: Alan Chen | last post by:
Hi, I am writing my first web service program, I am puzzled that I can't use params while I have no problem in a console app. public string Request( params object elements ) { //code...
2
by: Mikael Engdahl | last post by:
Hi, I have a situation on an ASP.NET page on which I do a simple Response.Write(Request.Params). The problem is that when the parameters include special characters like ä or é they are...
4
by: Alex Sibilev | last post by:
Hello, I have a really weird problem I've been trying to solve it without any luck for the last couple of hours :( I'm writing a "conference board" application (quite similar to ASP.NET...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
17
by: Terry Olsen | last post by:
Given that variable dt = "3/31/2007", why does it produce the following exception on some machines? It works fine on my PC, but others have sent me this exception information because it threw up on...
3
by: modermo | last post by:
Hey new to javascript figuring out how to fix this darn problem. I employ an image rollover, and it works beautifully in safari. But in firefox, the image has an annoying blue border around...
7
xNephilimx
by: xNephilimx | last post by:
lHi guys! I'm having a little problem that's getting on my nerves, I couldn't find a solution, I also tryed googling it and I found nothing... (my field of expertise is in AS 2 and 3, but I still...
1
by: harikumarmpl | last post by:
Hi to all Here i have a problem, I have a search form in that one which is for searching the usernames in the database It works fine when i search the UserNames at first time. When i have...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.