Log In    |    Knowledge Base    |    4D Home
Tech Tip: Hex and URL reserved words
PRODUCT: 4D | VERSION: 2003.2 | PLATFORM: Mac & Win
Published On: March 4, 2004

If you want to pass reserved characters like the ampersand through a URL, you will have to encode your URL in hex notation.

For example,

as in, a company named "James & Abbot"

the ampersand character is a reserved word in URLs, so HTTP will actually split this argument as

In order to correctly assign company to James&Abbot, your URL should be the following:
where 26H is hexadecimal for ascii character 38 or '&'

The following method named Helper_DecimalToHex will convert a decimal number into a hexadecimal string

to use it in URL encoding, you might apply it like so:

` returns '%26'