473,804 Members | 3,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

urlencode cannot handle spaces in URL correctly?

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

Jan 10 '08 #1
2 4717
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******** *************** ***********@e23 g2000prf.google groups.com...
For ASP.Net 2.0, if using HttpUtilities.U rlencode, 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("SPAC E"," ")
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...@g mail.com wrote:
For ASP.Net 2.0, if using HttpUtilities.U rlencode, 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
1242
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 name="xmlns:xsi"><xsl:text>http://www.w3.org/2001/XMLSchema-instance</xsl:te xt></xsl:attribute> <xsl:attribute name="xsi:noNamespaceSchemaLocation"><xsl:text>CR.xsd</xsl:text></xsl:attrib
0
1221
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
1849
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 something but my codes breaks at the difition of my class: "Public Class MainForm" ....so I'm assuming that the OutOfMemoryException occurs in the 3rd party since I have put a Try-Catch block around my bitmap creation code and I am
1
2249
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" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://CreditCardwizard.wws" /> </wsdl:fault> I am using VS.NET and generate the client-side proxies, but it seems
0
1242
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 SimpleXMLRPCServer and xmlrpclib.ServerProxy for connections. Whatever I do, after about 100,000 to 150,000 XMLRPCalls over a single ServerProxy connection, I am getting a connection error (usually "connection reset by peer"). I have tried deleting the...
5
3907
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: forms near the bottom of that page. The first, entitled "classic mailto form" just uses POST. All spaces get conveyed just fine. The second, entitled "better classic mailto form" has +s instead of spaces. The only fundamental difference I can...
1
1172
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
1062
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 bytes but when I copy that query in PL/SQL developer, there is no problem. Whats the limitations in batch execution of sql statements. kindly help me.
2
1031
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
9579
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
10332
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10077
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...
1
7620
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
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.