I am using HTTPRequest to add records to a database. It appears some of the text I am sending is interpreted as HEX values not text.
Below are examples -
I am sending ta%20%Center%20%Blvd I get ta ÃŽnter Blvd instead. The ÃŽ character appears to be a Hex CE.
The %20% represents a space for the syntax for the database API.
I sent ta Center Blvd I got taCenterBlvd
I sent ta%20%Inter%20%Blvd I got ta Inter Blvd
I sent %20%she%20%was%20%very%20%approachable,%20%call%20%her%20%in%20%a%20%few. I get - she was very approachable, Êll her in a þw.
The errors are all preceded by a space.
I am sending )%20%371-3732 I get ) 71-3732. I find if I eliminate the space between ) and 3 I get )371-3732
Thanks again.
More HTTPRequest Help Needed
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The escape sequence for Space is just %20. I think you are adding an extra % after it, which is wrong. That extra % would then become an escape sequdnce for %CE which as you notice is probably something else.
If you DO intend to send a % symbol as a % symbol then that would need escaping too, since it is an escape char itself. The escape sequence for % is %25 as per the following page:
See:
http://www.december.com/html/spec/esccodes.html
So basically I think your mistake is just that you are using %20% for space instead of just %20 which is correct.
HOWEVER, to make your life a little easier, VBScript has an Escape function which will do all this for you. E.g.
Let>parms=ta Center Blvd
VBEval>Escape("%parms%"),escaped_parms
MessageModal>escaped_parms
You will see that escaped_parms is now a correctly URL escaped string.
If you DO intend to send a % symbol as a % symbol then that would need escaping too, since it is an escape char itself. The escape sequence for % is %25 as per the following page:
See:
http://www.december.com/html/spec/esccodes.html
So basically I think your mistake is just that you are using %20% for space instead of just %20 which is correct.
HOWEVER, to make your life a little easier, VBScript has an Escape function which will do all this for you. E.g.
Let>parms=ta Center Blvd
VBEval>Escape("%parms%"),escaped_parms
MessageModal>escaped_parms
You will see that escaped_parms is now a correctly URL escaped string.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hello
RegEx ROCKS!!! Yeah man!!!
I use it like crazy now.
Pointless post, sorry.
PepsiHog
I use it like crazy now.
Pointless post, sorry.
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!