473,396 Members | 1,799 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.

asp URLEncode to aspx

Hi all.
Url encoding a string on asp page and url decoding the string on aspx page,
non English characters are lost.
Encoding and decoding on the same page, asp or aspx, works fine.
Any idea?
Thanks.
Sharon.
Nov 19 '05 #1
4 1602
I don't understand exactly why, but saving the asp page as utf-8 did the
trick.
Sharon.

"Sharon" <no**@null.void> wrote in message
news:Ok**************@TK2MSFTNGP14.phx.gbl...
Hi all.
Url encoding a string on asp page and url decoding the string on aspx page, non English characters are lost.
Encoding and decoding on the same page, asp or aspx, works fine.
Any idea?
Thanks.
Sharon.

Nov 19 '05 #2
Sharon wrote:
I don't understand exactly why, but saving the asp page as utf-8 did
the trick.
Sharon.


That's because ASP.NET expects non-ASCII characters contained in query
strings to be UTF-8 encoded by default, whereas ASP used some 8 bit
encoding like Latin 1.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #3
Thanks for the explanation.
When requesting a query field it is automatically url decoded,
and the result string is missing data.
Is there a way to convert it to utf-8?
Sharon.

"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:xn****************@msnews.microsoft.com...
Sharon wrote:
I don't understand exactly why, but saving the asp page as utf-8 did
the trick.
Sharon.


That's because ASP.NET expects non-ASCII characters contained in query
strings to be UTF-8 encoded by default, whereas ASP used some 8 bit
encoding like Latin 1.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de

Nov 19 '05 #4
Sharon wrote:
Thanks for the explanation.
When requesting a query field it is automatically url decoded,
and the result string is missing data.
Is there a way to convert it to utf-8?
Sharon.


Sharon,

if the strings contained in Request.QueryString are missing characters,
the client was using a different encoding (non-recognized byte
sequences are simply dropped).

Either change the client's encoding (didn't you do that already
successfully?) or change the encoding used by ASP.NET (at least
requestEncoding in web.config).

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #5

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

Similar topics

3
by: George Hester | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en-us;301464 Look down at the MyPage.asp example. You will see that Microsoft does this: 'Costruct the URL for the current page s = "http://"...
1
by: yawnmoth | last post by:
Any ideas as to why urlencode(addslashes(chr(0))) returns '%5C0'? It seems like it should return '%00' since that's what urlencode(chr(0)) returns. If not that, I could also see it returning...
1
by: Jim | last post by:
Hello, I'm trying to do urllib.urlencode() with unicode correctly, and I wonder if some kind person could set me straight? My understanding is that I am supposed to be able to urlencode...
0
by: Chris | last post by:
Just a curiosity: Is it standard practice to UrlEncode and UrlDecode cookie values? I wouldn't have even stumbled across this except I noticed that when I retrieve a cookie that was set with...
4
by: Andreas Klemt | last post by:
Hello, is there a difference between System.Web.HttpUtility.UrlEncode and Server.UrlEncode ?
1
by: msn | last post by:
Invalid file name for monitoring: 'E:\inetpub\wwwroot\xxxxxxx\xxxxxxx\Server.UrlEncode("login.aspx'. File names for monitoring must have absolute paths, and no wildcards. ...
2
by: Grey | last post by:
How can I use the URLEncode in ASP.NET?? If i used URLEncode to encode the URL, how can I decode the URL with proper parameter values in ASP.NET?? I can encode the URL, but i cannot decode it...
1
by: Dario Sala | last post by:
Hi, what's the difference about Asp Server.UrlEncode and the Asp.Net Server.UrlEncode ? In asp: Server.UrlEncode("*") = %2A In Asp.Net: Server.UrlEncode("*") = *
12
by: sleytr | last post by:
Hi, I'm trying to make a gui for a web service. Site using ± character in value of some fields. But I can't encode this character properly. >>> data = {'key':'±'} >>> urllib.urlencode(data)...
6
by: CindyH | last post by:
Hi I'm not sure whether I should send this as a new message or use the one I've been using but... I'm using vb.net 2.0 - My problem is I need to send something like this: 'dim encodedstring =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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.