Products Downloads


French version


 

This function is used to encode a string in an IMAGE variable in base64, taking into account character encoding.


Context

  • Windows client

  • Windows server

  • Java client

  • Java server

  • Adelia Web Client

  • Adelia Cloud client

  • Event Adelia client


Parameters

ALPHA

SourceString

String to encode.

ALPHA

Encoding

Character encoding to use when converting the alphanumeric string. This encoding value must be included in the character set registry defined by the IANA. It must also be included in the character sets supported by the JVM (Java) or libiconv library (Windows).

If encoding is not specified (empty string), the string to encode is converted using:

  • the JVM default encoding in Java,
  • the system's current ANSI code in Windows.
IMAGE Base64Binary Target binary, the result of the base64 encoding of the source string conversion according to the specified character encoding.

NUM_BIN_2

ReturnCode

Operation return code:

 0: Operation completed successfully.

-1: Character encoding not supported.

-3: Invalid IMAGE variable (C platform)


For example

ALPHA(100)

str

IMAGE

pictureB64

ALPHA(20) encoding

NUM_BIN_2

retCode


str = 'The pound (sign £)is the main unit of sterling'

encoding = 'UTF-8'

CALL_DLL 'VATOOLBX.DLL' 'VaToolBxAlphaToBase64Image' str encoding pictureB64 retCode



List of VaToolBx DLL functions by topic


↑ Top of page

  • Aucune étiquette