Internet Direct (Indy)
Home
PreviousUpNext
TIdURI.PathEncode Method

Converts URI path values to their encoded form.

Pascal
class function PathEncode(
    const ASrc: string
): string;
Parameters 
Description 
ASrc 
Unencoded parameter values for the method. 

String - Path value with unsafe characters translated to their encoded form.

PathEncode is a String function used to convert unsafe or reserved characters in the URI path specified in ASrc to their encoded form. PathEncode will convert unsafe characters to their representation in the form %nn, when nn is a the ordinal value of the unsafe character expressed in hexadecimal form. Unsafe characters include any ordinal value less than $16 (32 Decimal), greater than $79 (127 Decimal), and the following reserved characters: 

 

(Space) 

 

PathEncode is a class method, and may be used with a class instance instead of an object instance. For example: 

 

   sEncVal := TIdURI.PathEncode('program filesborlanddelphi6');
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.