
NetLinx UniCode Functions
174
NetLinx Programming Language Reference Guide
NetLinx UniCode Functions (Cont.)
WC_DECODE
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)
WC_ENCODE
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)
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...