Encode NON-ANSI characters to specified string (%hh).
BSTR EncodeHex( [in] BSTR Src, [in, optional, defaultvalue(".")] BSTR Neglect, [in, optional, defaultvalue(65001)] long CodePage);
Parameters
Src
Characters to be encoded.
Neglect
Characters not to be encoded.
CodePage
Specifies the code page to be used to perform the conversion.
Return Value
Return value is the encoded characters.
Remarks
This method will encode single character that is not in [A-Za-z0-0] and Neglect parameter to %hh. hh is unsigned hexadecimal integer of character code.
Usage Example
Dim oTool, src Set oTool = CreateObject("EmailArchitectObjects.Tools") src = "adf kf" WScript.Echo( oTool.EncodeHex( src )) The output is "adf%20kf"