4D v14.3

Convert to text

Home

 
4D v14.3
Convert to text

Convert to text 


 

Convert to text ( blob ; charSet ) -> Function result 
Parameter Type   Description
blob  BLOB in BLOB containing text expressed in a specific character set
charSet  String, Longint in Name or Number of BLOB character set
Function result  Text in Contents of BLOB expressed in 4D character set

The Convert to text command converts the text contained in the blob parameter and returns it in text expressed in the character set of 4D. 4D uses the UTF-16 character set by default.

In charSet, pass the character set of the text contained in blob, which will be used for the conversion. If the BLOB contains text copied from within 4D, then the BLOB’s text is likely to be in the UTF-16 character set. You can pass a string providing the standard name of the character set, or one of its aliases (for example, “ISO-8859-1” or “UTF-8”), or its identifier (longint). For more information, please refer to the description of the CONVERT FROM TEXT command.

Convert to text supports Byte Order Marks (BOMs). If the character set specified is of the Unicode type (UTF-8, UTF-16 or UTF-32), 4D attempts to identify a BOM among the first bytes received. If one is detected, it is filtered out of the result and 4D uses the character set that it defines instead of the one specified.

If the command has been correctly executed, the OK variable is set to 1. Otherwise, it is set to 0.

 
PROPERTIES 

Product: 4D
Theme: String
Number: 1012

The OK variable is changed by the commandThe Unicode mode affects this command

 
HISTORY 

Created: 4D v11 SQL
Modified: 4D v12

 
SEE ALSO 

CONVERT FROM TEXT

 
TAGS 

BOM

 
ARTICLE USAGE

4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : Convert to text ( 4D v12.4)