forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


URL encoding

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Aug 14, 2002 6:29 am    Post subject: URL encoding Reply with quote

I am looking for a good way to encode URLs, i.e. escaping web-unsafe characters for communication with a web server, like this:

This is a test + \folder
=
This%20is%20a%20test%20%2B%20%5Cfolder

I have a blurred memory of some DLL doing this, or was it only decoding? Or is it my imagination Confused Laughing

Hmmm, maybe the only way is a VDS search and replace?

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Aug 14, 2002 6:40 am    Post subject: Reply with quote

VDSXFN.DLL http://www.vdsworld.com/index.php?page=download&fileid=18
Has a replace function that you could use.
%%String = @FX(REPSTR,%%String,@CHR(32),"%20",\,"%5C")

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Aug 14, 2002 12:56 pm    Post subject: Reply with quote

Thanx. I'll look into that one.

Meanwhile it has turned out that there are some caveats when it comes to replacing chars in URLs. Some characters
should be replaced in resource names but not in paths, for instance:
'~', '_' and '@' should be encoded in resource names but not in paths, so

server.somesite.com/~files/code~example.htm
=
server.somesite.com/~files/code%7Eexample.htm

I'm compiling a list of chars and escape codes - if anyone else is interested I could post it.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Oct 11, 2002 7:38 pm    Post subject: Reply with quote

Hi Dr. Dread,

Did you ever finish that list of codes? I'd like to see it. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Sat Oct 19, 2002 1:02 pm    Post subject: Reply with quote

Yup, I've got that list of codes. It comes out kinda bad coz it is tabbed, so I'll mail it to ya.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group