Converts a string from unicode representation to single byte representation.
Kernel.bdh
StrUnicode2Ansi( out sAnsi : string, in nAnsiBytes : number, in sUnicode : string, in nByteOrder : number optional ): boolean;
true if successful
false otherwise
| Parameter | Description |
|---|---|
| sAnsi | String receiving the single-byte representation. |
| nAnsiBytes | Number of bytes to be used in sAnsi. |
| sUnicode | String in unicode representation that is to be converted. |
| nByteOrder |
Number (optional) which declares if the Unicode is in little endian or in big endian. Possible values are:
|
dcltrans transaction TMain var sAnsi, sUnicode: string; begin sAnsi := "hello world!"; StrAnsi2Unicode(sUnicode, STRING_COMPLETE, sAnsi); writeln(StrUnicodeLen(sUnicode)); StrUnicode2Ansi(sAnsi, STRING_COMPLETE, sUnicode); end TMain;