Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Hand made Url Encode or Decode

Digital Innovation Partner

Hand made Url Encode or Decode

Sometime happen that you need to encode or decode an url manually , so not soo much characters need to be converteted to encode or decode an url string.
In this post some example you can drag and use or modify.

In recent version of Delphi you can use standard Delphi routine contained in the “NetEncoding” library like:

If you do this manually, in the 99% of cases you need only convert the most common URI charecter (with percent as the start of escape char) :

Common characters after percent-encoding (ASCII or UTF-8 based)
< > ~ . " { } | \ - ` _ ^ % space
%3C %3E %7E %2E %22 %7B %7D %7C %5C %2D %60 %5F %5E %25 %20

for more information you can read this article on wikipedia : http://en.wikipedia.org/wiki/Percent-encoding

A Delphi example of URL encode :

An Oracle PL/SQL Url decoding example :

Tags: , , , ,

Lascia un commento