473,390 Members | 1,312 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,390 software developers and data experts.

Querystring with accented characters

I have encountered a problem when certain European characters are included in
the Querystring of an URL.

If I have a URL like: ?param=AA*

On the receiving page a simple Request() call returns "AA" and not "AA*".

It drops all accented characters!

If I change to use a Form instead, it works OK.

If I copy the Request.QueryString to a String variable and split it I manage
to get the proper value.

I have tried this on Windows 2000 and Windows 2003 with the same result.

Is this a known bug with Request.QueryString? And if so is there a
fix/workaround??

Thanks

John Byrne
Australia
Jul 22 '05 #1
10 4474
No issues on my end. Have you tried a different browser? Does it appear
right in a view-source? Have you tried URLEncoding it?

Ray at home
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
I have encountered a problem when certain European characters are included
in
the Querystring of an URL.

If I have a URL like: ?param=AA

On the receiving page a simple Request() call returns "AA" and not "AA ".

It drops all accented characters!

If I change to use a Form instead, it works OK.

If I copy the Request.QueryString to a String variable and split it I
manage
to get the proper value.

I have tried this on Windows 2000 and Windows 2003 with the same result.

Is this a known bug with Request.QueryString? And if so is there a
fix/workaround??

Thanks

John Byrne
Australia

Jul 22 '05 #2
This is an ASP Request object problem. Different browser makes no difference.

Getting parameters on the server side behaves differently depending on how
the ASP page was requested.

It works as expected when a form is submitted, but if the page is requested
via URL then Request("<parm>") doesn't return accented characters.

Thanks

"Ray Costanzo [MVP]" wrote:
No issues on my end. Have you tried a different browser? Does it appear
right in a view-source? Have you tried URLEncoding it?

Ray at home
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
I have encountered a problem when certain European characters are included
in
the Querystring of an URL.

If I have a URL like: ?param=AAÃ

On the receiving page a simple Request() call returns "AA" and not "AAÃ ".

It drops all accented characters!

If I change to use a Form instead, it works OK.

If I copy the Request.QueryString to a String variable and split it I
manage
to get the proper value.

I have tried this on Windows 2000 and Windows 2003 with the same result.

Is this a known bug with Request.QueryString? And if so is there a
fix/workaround??

Thanks

John Byrne
Australia


Jul 22 '05 #3


"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
This is an ASP Request object problem. Different browser makes no

difference.

Not necessarily.

Did you miss the part where I asked if the appears in a view-source? If
so, it's a browser problem. I'm not saying that this is the problem, but
it'd help to rule it out...

Ray at work
Jul 22 '05 #4
This is certainly a server-side issue. If the URL for a page is ?parm=AA*

and the ASP page did:

Response.Write(Request.QueryString);

you get:

parm=AA*

but if you did:

Response.Write(Request("parm"));

you get:

AA

but works fine if page invoke via a form (either post or get)

JB

"Ray Costanzo [MVP]" wrote:


"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
This is an ASP Request object problem. Different browser makes no

difference.

Not necessarily.

Did you miss the part where I asked if the à appears in a view-source? If
so, it's a browser problem. I'm not saying that this is the problem, but
it'd help to rule it out...

Ray at work

Jul 22 '05 #5
If you don't want answers, don't ask questions.

Ray at home

"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
This is certainly a server-side issue. If the URL for a page is ?parm=AA

and the ASP page did:

Response.Write(Request.QueryString);

you get:

parm=AA

but if you did:

Response.Write(Request("parm"));

you get:

AA

but works fine if page invoke via a form (either post or get)

JB

"Ray Costanzo [MVP]" wrote:


"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
> This is an ASP Request object problem. Different browser makes no

difference.

Not necessarily.

Did you miss the part where I asked if the à appears in a view-source?
If
so, it's a browser problem. I'm not saying that this is the problem, but
it'd help to rule it out...

Ray at work

Jul 22 '05 #6
Ray Costanzo [MVP] wrote on 20 dec 2004 in
microsoft.public.inetserver.asp.general:
If you don't want answers, don't ask questions.


I didn't ask, I still like to read the answers.

That is the joy of usenet.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 22 '05 #7
No, it's the people that are the joy of usenet. Also top-posting. ;]

Ray at home

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Ray Costanzo [MVP] wrote on 20 dec 2004 in
microsoft.public.inetserver.asp.general:
If you don't want answers, don't ask questions.


I didn't ask, I still like to read the answers.

That is the joy of usenet.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 22 '05 #8
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
"Ray Costanzo [MVP]" wrote:
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
This is an ASP Request object problem. Different browser makes no

difference.

Not necessarily.

Did you miss the part where I asked if the appears in a view-source? If so, it's a browser problem. I'm not saying that this is the problem, but it'd help to rule it out...

Ray at work

This is certainly a server-side issue. If the URL for a page is ?parm=AA

and the ASP page did:

Response.Write(Request.QueryString);

you get:

parm=AA

but if you did:

Response.Write(Request("parm"));

you get:

AA

but works fine if page invoke via a form (either post or get)

JB


Actually, it's probablly a combination of both client and server issues. I
believe the problem is associated with the character encoding. Here are some
things to check:

1. In your browser, what character encoding are you using?
2. On the server, what codepage/character encoding are being used. There are
quite a few places where codepage can be set. Here's an excerpt from the
Response.CodePage documentation that describes how the codepage setting
cascades:

If Response.CodePage is not explicitly set in a page, it is implicitly set
by Session.CodePage, if sessions are enabled. If sessions are not enabled,
Response.CodePage is set by @CodePage, if @CodePage is present in the page.
If there is no @CodePage in the page, Response.CodePage is set by the
AspCodePage metabase property. If the AspCodePage metabase property is not
set, or set to 0, Response.CodePage is set by the system ANSI codepage.

Here's a link to the documentation:
http://www.msdn.microsoft.com/librar...om_resopcp.asp

Jul 22 '05 #9
Thanks for your informative reply.

Initially the ASP pages had a charset of windows-1252 and the
Session.CodePage was 65001. I then went and changed all pages to use charset
UTF-8, but the problem still persisted.

I have also tried saving the ASP pages in UTF-8 format instead of the normal
ANSI encoding, but this also had no affect.

The work-around I had to come up with was create a function that would parse
the QueryString and return the requested parameter.

Thanks

"Chris Hohmann" wrote:
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
"Ray Costanzo [MVP]" wrote:
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...

> This is an ASP Request object problem. Different browser makes no
difference.

Not necessarily.

Did you miss the part where I asked if the à appears in a view-source? If so, it's a browser problem. I'm not saying that this is the problem, but it'd help to rule it out...

Ray at work

This is certainly a server-side issue. If the URL for a page is ?parm=AA*

and the ASP page did:

Response.Write(Request.QueryString);

you get:

parm=AA*

but if you did:

Response.Write(Request("parm"));

you get:

AA

but works fine if page invoke via a form (either post or get)

JB


Actually, it's probablly a combination of both client and server issues. I
believe the problem is associated with the character encoding. Here are some
things to check:

1. In your browser, what character encoding are you using?
2. On the server, what codepage/character encoding are being used. There are
quite a few places where codepage can be set. Here's an excerpt from the
Response.CodePage documentation that describes how the codepage setting
cascades:

If Response.CodePage is not explicitly set in a page, it is implicitly set
by Session.CodePage, if sessions are enabled. If sessions are not enabled,
Response.CodePage is set by @CodePage, if @CodePage is present in the page.
If there is no @CodePage in the page, Response.CodePage is set by the
AspCodePage metabase property. If the AspCodePage metabase property is not
set, or set to 0, Response.CodePage is set by the system ANSI codepage.

Here's a link to the documentation:
http://www.msdn.microsoft.com/librar...om_resopcp.asp

Jul 22 '05 #10

"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:51**********************************@microsof t.com...
"Chris Hohmann" wrote:
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
"Ray Costanzo [MVP]" wrote:
> "John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
> news:D2**********************************@microsof t.com...
>
> > This is an ASP Request object problem. Different browser makes no
> difference.
>
> Not necessarily.
>
> Did you miss the part where I asked if the appears in a view-source?
If
> so, it's a browser problem. I'm not saying that this is the
problem, but
> it'd help to rule it out...
>
> Ray at work
>
This is certainly a server-side issue. If the URL for a page is
?parm=AA
and the ASP page did:

Response.Write(Request.QueryString);

you get:

parm=AA

but if you did:

Response.Write(Request("parm"));

you get:

AA

but works fine if page invoke via a form (either post or get)

JB
Actually, it's probablly a combination of both client and server issues.

I believe the problem is associated with the character encoding. Here are some things to check:

1. In your browser, what character encoding are you using?
2. On the server, what codepage/character encoding are being used. There are quite a few places where codepage can be set. Here's an excerpt from the
Response.CodePage documentation that describes how the codepage setting
cascades:

If Response.CodePage is not explicitly set in a page, it is implicitly set by Session.CodePage, if sessions are enabled. If sessions are not enabled, Response.CodePage is set by @CodePage, if @CodePage is present in the page. If there is no @CodePage in the page, Response.CodePage is set by the
AspCodePage metabase property. If the AspCodePage metabase property is not set, or set to 0, Response.CodePage is set by the system ANSI codepage.

Here's a link to the documentation:
http://www.msdn.microsoft.com/librar...om_resopcp.asp

Thanks for your informative reply.

Initially the ASP pages had a charset of windows-1252 and the
Session.CodePage was 65001. I then went and changed all pages to use

charset UTF-8, but the problem still persisted.

I have also tried saving the ASP pages in UTF-8 format instead of the normal ANSI encoding, but this also had no affect.

The work-around I had to come up with was create a function that would parse the QueryString and return the requested parameter.

Thanks


CodePage 65001 is associated with UTF-8, not Windows-1252. Here's a link to
the characterset/codepage table referenced in the Response.CodePage
documentation:
http://msdn.microsoft.com/workshop/a...s/charset4.asp
Also, did you check what the character encoding setting was in your browser?
Jul 22 '05 #11

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

Similar topics

1
by: Fuzzyman | last post by:
I've written an anagram finder that produces anagrams from a dictionary of words. The user can load their own dictionary. ( http://www.voidspace.org.uk/atlantibots/nanagram.html ) In order to...
2
by: Remco van den Berg | last post by:
I'm running a MySQL database with one of tables holding the members of a volleybal club in the Netherlands. One the the fields in that table is holding the name of the players. How do I search...
2
by: nicolas_riesch | last post by:
I try to use python as the language in an asp page with Microsoft IIS 5.0. I have these two files, req_bad.asp and req_ok.asp ---------- req_bad.asp --------- <%@LANGUAGE=Python%> <%
4
by: Satish | last post by:
Hi Gurus, Please help me in this, I have tried all options available to me. (Option 1) I am making a simple request from VB.NET client to WBI generated WSDL and passing request parameters. The...
0
by: shintu | last post by:
Hallo, I am trying to write french accented characters in Excel worksheet using my perl script , But I am stuck here as I couldnt find a way of writing it !: My code: use strict;...
2
by: gsuns82 | last post by:
Hi all, I have to replace accented characters from a input string with normal plain text.I have coded as follows. String input = ""; input=...
4
by: gsuns82 | last post by:
Hi all, I am facing a strange issue. i.e: I have a jsp page with an input text field where the user can enter searching value even along with Accented Characters.After that i...
1
by: gsauns | last post by:
I have an ASP.NET app in which I import from a comma-delimited text file, put all that data in a GridView, and then insert the records into multiple related tables in my SQL Server database. I...
3
by: Jake | last post by:
I am writing a script that allows people to upload a CSV file for processing and I am having trouble with accented characters. If a UTF-8 encoded file is uploaded, everything works fine. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.