Topic Path: Symbol Reference > Classes > TIdURI Class > TIdURI Methods > ParamsEncode Method
ContentsIndexHome
PreviousUpNext
TIdURI.ParamsEncode Method

Converts URI parameter values to their encoded form.

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

String - Parameter values with unsafe characters translated to their encoded values.

ParamsEncode is a string function used to convert unsafe or reserved characters in the URI parameter values specified in ASrc to their encoded form. ParamsEncode 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 greater than $79 (127 Decimal), and the following reserved characters: 

 

 

ParamsEncode will also convert the space character (CHAR32) to it's encoded representation as the character '+' (43 Decimal) (2B Hex). 

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

 

   sEncVal := TIdURI.ParamsEncode('gn=local group+uid=12');
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.