Wc_Decode; Wc_Encode - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

NetLinx UniCode Functions
NetLinx UniCode Functions (Cont.)

WC_DECODE

WC_ENCODE

174
This function decodes Unicode string from a character string using one of 4
formats.
WIDECHAR[ ] WC_DECODE(CHAR cData[], INTEGER Format, LONG
Start)
Parameters:
• cData: String containing the encoded Unicode string
• Format:
1 Unicode: The data is encoded as a Unicode formatted stream. The
constant WC_FORMAT_UNICODE is defined as a value of 1 for specifying
this format.
2 Unicode BE: The data is encoded as a Unicode BE (Big Endian) formatted
stream. The constant WC_FORMAT_UNICODE_BE is defined as a value of
2 for specifying this format.
3 UTF-8: The data is encoded as a UTF-8 formatted stream. The constant
WC_FORMAT_UTF8 is defined as a value of 3 for specifying this format.
4 TP: The data is encoded for use with the UNI TP command. The constant
WC_FORMAT_TP is defined as a value of 4 for specifying this format.
• Stat: Position in Data from which to start reading
Result:
A WIDECHAR array containing the Unicode data.
wcMyString = WC_DECODE(cData, WC_FORMAT_UNICODE,1)
This function encodes a Unicode string to a character string using one of 4 for-
mats.
WIDECHAR[ ] WC_ENCODE(WIDECHAR STRING[], INTEGER Format,
LONG Start)
Parameters:
• STRING: String containing the Unicode string to encode
• Format:
1 Unicode: Encode the data as a Unicode formatted stream. The constant
WC_FORMAT_UNICODE is defined as a value of 1 for specifying this
format.
2 Unicode BE: Encode the data as a Unicode BE (Big Endian) formatted
stream. The constant WC_FORMAT_UNICODE_BE is defined as a value of
2 for specifying this format.
3 UTF-8: Encode the data as a UTF-8 formatted stream. The constant
WC_FORMAT_UTF8 is defined as a value of 3 for specifying this format.
4 TP: Encode the data for use with the UNI TP command. The constant
WC_FORMAT_TP is defined as a value of 4 for specifying this format.
• Stat: Position in STRING from which to start reading
Result:
Result is a CHAR array containing the encoded Unicode data.
cData = WC_ENCODE(wcMyString, WC_FORMAT_UNICODE,1)
NetLinx Programming Language Reference Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents