473,480 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to translate string to web compatible format?

Hi!
I want to open a google search from my program. But Google does for example
not understand the search parameters, if one of them is C# , e.g. "C#
tutorials". Only if I convert it to c%23%20tutorials. Is there a function
which can already do this? It has to be, because every search field in IE
does it all the time... I hope someone knows what I am talking about.

right URL to google: "http://www.google.com/search?hl=en&q=c%23%20tutorials"
wrong URL: "http://www.google.com/search?hl=en&q=c# tutorials"
Aug 19 '07 #1
1 1514
System.Web.HttpUtility.UrlEncodeUnicode with reference System.Web did the
charm...

"Alexander" wrote:
Hi!
I want to open a google search from my program. But Google does for example
not understand the search parameters, if one of them is C# , e.g. "C#
tutorials". Only if I convert it to c%23%20tutorials. Is there a function
which can already do this? It has to be, because every search field in IE
does it all the time... I hope someone knows what I am talking about.

right URL to google: "http://www.google.com/search?hl=en&q=c%23%20tutorials"
wrong URL: "http://www.google.com/search?hl=en&q=c# tutorials"
Aug 19 '07 #2

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

Similar topics

1
3266
by: Arnaud | last post by:
Hi, I'm trying to translate a string, actually some numbers in unicode format (4 digit for a character), do you know an easy way to do it ? Thanks arnaud
7
2317
by: Bengt Richter | last post by:
Just thought None as the first argument would be both handy and mnemonic, signifying no translation, but allowing easy expression of deleting characters, e.g., s = s.translate(None,...
1
1827
by: Neil Schemenauer | last post by:
The title is perhaps a little too grandiose but it's the best I could think of. The change is really not large. Personally, I would be happy enough if only %s was changed and the built-in was...
15
1791
by: jiverbean | last post by:
Dear group members, I cam across a glitch in Javascript and I don't know how to solve it elegantly. I have an array with strings of German words: profile = "Fröhliches Fräulein"; Because...
6
2724
by: bobueland | last post by:
The module string has a function called translate. I tried to find the source code for that function. In: C:\Python24\Lib there is one file called string.py I open it and it says
5
1710
by: Cleverbum | last post by:
I'm not really accustomed to string manipulation and so I was wondering if any of you could be any help i speeding up this script intended to change the format of some saved log information into a...
1
9369
by: peterbe | last post by:
This has always worked fine for me. Peter fine Now if I do it with a unicode string: Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/string.py", line...
4
6385
by: Michael Meckelein | last post by:
Hello, Wondering, if C# (framework 2.0) does not support parsing DateTime timezones in three letter acronyms. I would like to parse date strings like "2005 Nov 01 11:58:47.490 CST -6:00" but...
3
3189
by: doubts | last post by:
Hi all, I am trying to convert my bulk of code from VC++ 6.0 to VC++.Net. when using std::string type variable, the application causes exception at one instance and does not cause an exception at...
8
3037
by: Joergen Bech | last post by:
Suppose I have written a .Net application and - until now - have hardcoded all my text strings. Now, the application needs to be translated into another language. Furthermore, the translation must...
0
7041
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
6908
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
7043
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
7081
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...
0
6921
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...
1
4776
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...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
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 ...
0
179
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...

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.