Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert to URL-coded string

Status
Not open for further replies.

ZakiMaksyutov

Programmer
Feb 28, 2001
87
RU
Hi!

I need to write one function on VBScript (or JavaScript).
This function receive one string as parameter and should return URL-coded string. It means following: every symbol writes as "%$$", where $$ - 16-value of this symbol, the ANSI symbol occupies one byte, but russian (f.i.) symbol occupies two bytes: "%$$%$$", japanese three bytes (UTF8-coded string).

May be anyone knows how it should be done?

Thanks for any help...
 
you can do it in javascript with this simple method :

escape(URLString); to encode it end
unescape(URLString); to decode

Hope this helps
 
No :(
it encodes but in another way...
----------------------------
e.g.
"test"->"test"
but I need the following:
"test"->"%74%65%73%74"
----------------------------
May be anyone can help me with this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top