Team LiB
Previous Section Next Section

Encoding

When data is sent from the client to a CGI program on the server, using the standard content type of application/x-www-form-urlencoded, several "special" characters are encoded. The most common encoded characters you'll encounter include the following:

  • Anything less than ASCII character 32, encoded as %XY, where XY is the hexadecimal code.

  • Space character, which is encoded either as + or %20.

  • The double quote ("), which is encoded as %22.

  • The single quote ('), which is encoded as %27.

  • The / character, which is encoded as %2F.

For more on encoding, please see the official W3C standards documents that list each character.

NOTE

It is important to know that as a PHP programmer, by and large you will rarely have to deal with encoding issues. Generally you will find that PHP itself manages this in the background and you won't encounter the encoded data directly.


    Team LiB
    Previous Section Next Section