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

urlencode cannot handle spaces in URL correctly?

For ASP.Net 2.0, if using HttpUtilities.Urlencode, it will encode
spaces as '+' rather than %20, is this a known issue or something
expected.

Jan 10 '08 #1
2 4701
It's correct encoding.
Both %20 and + are correct.
go to Google.com enter "a b" and hit go. You will see folowing URL
http://www.google.com/search?hl=en&q=a+b

George.

<go***********@gmail.comwrote in message
news:db**********************************@e23g2000 prf.googlegroups.com...
For ASP.Net 2.0, if using HttpUtilities.Urlencode, it will encode
spaces as '+' rather than %20, is this a known issue or something
expected.

Jan 10 '08 #2
for characters like that, i replace as something else first, then
encode, and when after i decode i replace back

like this

a = "some string"

a = a.replace(" ","SPACE")

coded = urlencode(a)
--- to read

b = urldecode(coded)
b = b.replace("SPACE"," ")
cause in my situation "SPACE" will never be passed in the url, so i
can safely use it

On Jan 11, 6:42*am, gouqizi.lv...@gmail.com wrote:
For ASP.Net 2.0, if using HttpUtilities.Urlencode, it will encode
spaces as '+' rather than %20, is this a known issue or something
expected.
Jan 11 '08 #3

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

Similar topics

0
by: Tim Meagher | last post by:
I have an XSL transform that tries to set the schema definition of the root attribute as follows: <xsl:template match="CR"> <xsl:element name="CR"> <xsl:attribute...
0
by: Rajiv Das | last post by:
Environment: Visual Studio 2005, Beta 2 ..Net 2.0 Windows XP, SP2 C# Generics ------------------------------- Hi, I have a Windows Form whose contents I would like to dynamically change. I
3
by: elziko | last post by:
I have a procedure that creates a bitmap of a certain size and then displays it in a 3rd party component. However, if the bitmap is very large then a System.OutOfMemoryException is thrown my...
1
by: Steve | last post by:
I want to ask if .NET cannot handle WSDL with exception <wsdl:fault> element? <wsdl:fault name="CreditCardWizardException"> <soap:fault name="CreditCardWizardException" use="encoded"...
0
by: xristoph | last post by:
Hello everyone! I am trying to set up a broker-worker system (one broker, multiple and heterogeneous workers) in python for a local network (though possibly also over inet). I am using...
5
by: -Lost | last post by:
I was writing the 7th installment to introducing my children to HTML and came upon something that I am not familiar with, evidently. http://foomanchu.com/standardize7.htm I have two mailto:...
1
by: windy | last post by:
Hi all, I just found that i cannot handle arrowkey press on checkbox component? Any turnaround or sample to achieve it? Thanks~
0
by: Rashid Karim | last post by:
I have a java application on java Swing, EJBs, Bea WebLogic, and Oracle. When I run a long query in batch, I get this message: java.sql.SQLException: Oracle cannot handle batched SQL > 64k...
2
by: kronecker | last post by:
Are all the .net languages the same in their capabilities or should we stick to c++ for the really sticky problems? Is it the language or the underlying .net framework that is important? K.
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
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?
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
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
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...

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.