PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Encodes a character string or a buffer. To decode the result, all you have to do is use Decode.
Versions 23 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
New in version 23
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Example
// Encode an image in Base64
Res is string = Encode(fLoadBuffer("MyImage.jpg"), encodeBASE64)
// Encode a 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
encodeBASE64NoRC
New in version 25
encodeBASE64NoRC
encodeBASE64NoRC
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.
Versions 23 and later
AndroidAndroid Widget Unsupported format.
New in version 23
AndroidAndroid Widget Unsupported format.
AndroidAndroid Widget Unsupported format.
encodePCSASCII format. The encoded text contains printable characters only.
Versions 23 and later
AndroidAndroid Widget Unsupported format.
New in version 23
AndroidAndroid Widget Unsupported format.
AndroidAndroid Widget Unsupported format.
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.
encodeURLParameterURL format. The reserved characters of a URL are encoded in order to pass a URL in parameter to a URL.
Caution: The URL passed in parameter must have been encoded beforehand with one of the encodeURLFromAnsi, encodeURLFromUnicode or encodeURLFromUTF8 constants.
encodeUUEncodeUUEncode format. The encoded text contains printable characters only.
Versions 23 and later
AndroidAndroid Widget Unsupported format.
New in version 23
AndroidAndroid Widget Unsupported format.
AndroidAndroid Widget Unsupported format.
Business / GUI classification : Business Logic
Component : wd250std.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
IMAGEN /STRING
//VOU MOSTRAR HOJE, COMO TRANSFORMAR
//UMA IMAGEN EM STRING E TRANSFORMAR
//UMA STRING EM UMA IMAGEM

IMG_IMAGEN_1 = "c:\ICONES\IC_OK_N.PNG" // VALIDADO
EDT_IMAGEN_TEXTO=Encode(fChargeBuffer(IMG_IMAGEN_1),encodeBASE64)
//--
IMG_IMAGEM_VOLTA = Decode(EDT_IMAGEN_TEXTO,encodeBASE64)

//BLOG COM VIDE E EXEMPLO

http://windevdesenvolvimento.blogspot.com/2017/08/aula-1237-windev-imagen-006-encodedecode.html

https://www.youtube.com/watch?v=KLr4-1wg_WQ


De matos
11 Aug. 2017