473,320 Members | 2,107 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,320 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 4462
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.