PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Encodes a character string or a buffer. To decode the result, simply use Decode.
Example
// Encodage d'une image en Base 64
Res is string = Encode(fLoadBuffer("MonImage.jpg"), encodeBASE64)
// Encodage d'une URL
Info(Encode("https://www.google.fr/?", encodeURLFromAnsi) + ...
Encode(Encode("https://www.google.fr/?é", encodeURLFromAnsi), encodeURLParameter))
Syntax
<Result> = Encode(<Data> [, <Encoding format>])
<Result>: Character string
Data encoded according to the selected format.
<Data>: Character string or Buffer
Data to encode.
<Encoding format>: Optional Integer constant
Format for encoding data:
encodeBASE64
(Default value)
BASE 64 format (complies with the RFC 4648 standard). Encoded text contains only printable characters and CRs (Carriage Returns).
Versions 25 and later
encodeBASE64NoCR
New in version 25
encodeBASE64NoCR
encodeBASE64NoCR
BASE 64 format (complies with RFC 4648 standard) without RCs (Carriage Returns). The encoded text contains printable characters only.
encodeBASE64URLBASE 64 URL format (complies with the RFC 4648 standard). The encoded text contains printable characters only.
encodeBASE85BASE 85 format. The encoded text contains printable characters only.
encodePCSASCII format. The encoded text contains printable characters only.
encodeURLFromAnsiURL format. The encoded text only contains characters allowed in a URL. The text to encode is an ANSI string.
encodeURLFromUTF8URL format. The encoded text only contains characters allowed in a URL. The text to encode is a UTF-8 string.
encodeURLFromUnicodeURL format. The encoded text only contains characters allowed in a URL. The text to encode is a Unicode string.
encodeURLParameterThis constant is used when it is necessary to pass a URL A as a parameter to a URL B. The reserved characters of the URL A (//,?...) are encoded.
The URL A (to be encoded) must be a valid URL. If it has parameters of its own, they must have been encoded with one of the following constants: encodesURLDfromAnsi, encodeURLFromUnicode or encodeURLFromUTF8.
encodeUUEncodeUUEncode format. The encoded text contains printable characters only.
Business / UI classification: Business Logic
Component: wd270std.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment