4D v14.3BASE64 DECODE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
BASE64 DECODE
|
BASE64 DECODE ( {encodedText ;} blob ) | ||||||||
Parameter | Type | Description | ||||||
encodedText | Text |
![]() |
Text containing BLOB encoded in Base64 format | |||||
blob | BLOB |
![]() |
BLOB encoded in Base64 format | |||||
![]() |
Decoded BLOB | |||||||
The BASE64 DECODE command allows you to decode the BLOB coded in Base64 format passed in the encodedText or blob parameter.
If you pass the encodedText parameter, the command decodes its contents and returns it in the blob parameter. It must contain a BLOB encoded in Base64 format. In this case, the initial contents of the blob parameter are ignored by the command.
If you omit the encodedText parameter, the command directly modifies the BLOB passed in the blob parameter.
The command does not verify the contents of the encodedText or blob parameter. You must verify that the data passed is actually coded in Base64 format, otherwise the result will be incorrect.
This example lets you transfer a picture via a BLOB:
C_BLOB($sourceBlob)
C_PICTURE($mypicture)
$mypicture:=[people]photo
PICTURE TO BLOB($mypicture;$sourceBlob;".JPG")
C_TEXT($base64Text)
BASE64 ENCODE($sourceBlob;$base64Text) //Encoding of text
// the binary is now available as character strings in $base64Text
C_TEXT($base64Text)
C_BLOB($targetBlob)
BASE64 DECODE($base64Text;$targetBlob) //Decoding of text
// the binary encoded in base 64 is now available as a BLOB in $blobTarget
Product: 4D
Theme: Tools
Number:
896
Created: 4D 2004
Renamed: 4D v12
Modified: 4D v12
BASE64 ENCODE
Overview of XML DOM Commands
XML DECODE
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)
Inherited from : DECODE ( 4D v11 SQL Release 6)