|
|
|
|
|
Encode (Function) In french: Encode Encodes a character string or a buffer. To decode the result, simply use Decode. Caution: As the result of encoding is a character string, it may vary from one project configuration to another, depending on the setting of string management at runtime.
Res is string = Encode(fLoadBuffer("MonImage.jpg"), encodeBASE64)
Info(Encode("https://www.google.fr/?", encodeURLFromAnsi) + ...
Encode(Encode("https://www.google.fr/?é", encodeURLFromAnsi), encodeURLParameter))
MessageEnBuffer is Buffer = fChargeBuffer(fDataDir()/"monbuffer.bin")
MessageEnBuffer = Encode(MessageEnBuffer, encodeBASE64NoCR)
MessageEnBuffer = StringToUTF8(Encode(MessageEnBuffer, encodeBASE64NoCR))
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). | encodeBASE64NoCR | BASE 64 format (complies with RFC 4648 standard) without RCs (Carriage Returns). The encoded text contains printable characters only. | encodeBASE64URL | BASE 64 URL format (complies with the RFC 4648 standard). The encoded text contains printable characters only. | encodeBASE85 | BASE 85 format. The encoded text contains printable characters only. | encodePCS | ASCII format. The encoded text contains printable characters only. | encodeURLFromAnsi | URL format. The encoded text only contains characters allowed in a URL. The text to encode is an ANSI string. | encodeURLFromUnicode | URL format. The encoded text only contains characters allowed in a URL. The text to encode is a Unicode string.
| encodeURLFromUTF8 | URL format. The encoded text only contains characters allowed in a URL. The text to encode is a UTF-8 string.
| encodeURLParameter | This constant is used when it is necessary to pass a given URL (URL A) as a parameter to another URL (URL B). The reserved characters of URL A (//,?...) are encoded. 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: encodeURLDfromAnsi, encodeURLDfromUnicode or encodeURLDfromUTF8. | encodeUUEncode | UUEncode format. The encoded text contains printable characters only.
|
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|