473,765 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does Request.QuerySt ring handle UTF-8 data?

Hi all,

Can ASP retrieve UTF-8 encoded data in query string properly, when
used with IIS 5.0 on Windows 2000 Pro/Server?

With some trial and error, it seems that adding the directive
@CodePage = 65001 to an ASP page makes the ASP page decode UTF-8 data
in query string properly. Without the directive,
Request.QuerySt ring(var) returns garbled data. With the directive,
Request.QuerySt ring(var) decodes UTF-8 encoded data properly. (I tried
passing it to database with ADO; and VBScript function Len() also
returned the correct string length. I passed UTF-8 encoded Chinese
characters during my test.)

My search on the Web and newgroups, however, returned mostly results
that say ASP does not support UTF-8 encoded data in query string.
One of the search results is
http://www.microsoft.com/technet/pro.../interasp.mspx.
It was written in March 2000. Could things have changed since then?

Can anyone share their views and experience on this matter? Is the
@CodePage directive all that's needed to handle UTF-8 encoded data in
QueryString?

Thanks!

Cheers,
Samuel
Jul 19 '05 #1
0 2713

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

Similar topics

6
2751
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid = server.createobject("scriptlet.typelib").guid guid=Left(guid,instr(guid,"}")) genguid=guid
2
1838
by: Paolo Pignatelli | last post by:
I am trying to work the example on http://support.microsoft.com/default.aspx?scid=kb;EN-US;q315888 . I follow esxactly the advice (I beleive): Here are the files: WebForm1.aspx: -- .... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML>
2
5045
by: Navanith | last post by:
Hi, I wrote a simple aspx page that dumps query string to the browser. Following is the globalization section in web.config <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
1
2746
by: MrMike | last post by:
I have a DataGrid Hyperlink column as shown here. I'm trying to pass the JobNum parameter as shown. The JobNum parameter is the webform's Request.Querystring("JobNum"). I can't find out how to format this syntax correctly, as Request.Querystring("JobNum") causes a compilation error in the HTML. Could someone please let me know how I can reform this HTML? Currently I get the error "Compilation Error" when the page loads. ...
3
2407
by: Axel Dahmen | last post by:
Hi, I've created an aspx page taking a query string argument as parameter. Although I've correctly escaped umlauts in the query string, they do not appear in the QueryString collection. If I give: http://myComp/myPage.aspx?q=G%FCnther Request.QueryString yields "Gnther" instead of "Günther". What's happening?
4
6675
by: Lu | last post by:
Hi, i am currently working on ASP.Net v1.0 and is encountering the following problem. In javascript, I'm passing in: "somepage.aspx?QSParameter=<RowID>Chèques</RowID>" as part of the query string. However, in the code behind when I tried to get the query string value by calling Request.QueryString("QSParameter"), the value I got is: "<RowID>Chques</RowID>". The special character "è" has been stripped out. The web.config file is...
4
2869
by: Arvan | last post by:
there is 3 links to page default.aspx,and each one has a querystring,like a=1, b=1 ,c=1. problem is how do i ensure the name of querystring! how do?
0
2824
by: dolittle | last post by:
Hi, I`m using a server that receive a GET request with a query string that contains double-byte non-latin characters: http://www.example.com?%d7%90 and the java code: String queryString = request.getQueryString(); queryString = URLDecoder.decode(queryString, "utf-8");
5
3464
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration: default.aspx:
2
5522
by: Doogie | last post by:
Hi, I'm writing Javascript code to parse out a query string. I want to handle the case where a parameter value may not be sent. So consider a parameter called "State". If the user doesn't pass that in if I do this: var state = <%=Request.QueryString%> This returns an undefined object that I can't seem to do any checks
0
9566
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9393
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10153
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8830
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7371
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6646
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5413
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3530
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.