uniDecode | ||||||||||
Type | function | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Summary | Converts a string from Unicode to single-byte text. | |||||||||
Introduced | 1.0 | |||||||||
Changes | The ability to encode text in Polish was added in version 2.1.1. | |||||||||
Deprecated | 7.0 | |||||||||
OS | mac, windows, linux, ios, android | |||||||||
Platforms | desktop, server, mobile | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Values |
| |||||||||
Related | Keyword: character, characters, inverse Constant: null Property: textFont, unicodeText Function: format, platform, textDecode, textEncode, uniEncode Glossary: byte, function, object, property, return, Unicode Control Structure: function | |||||||||
Description | Use the uniDecode function to convert double-byte characters to single-byte characters.
The uniDecode function is the inverse of the uniEncode function and removes the null bytes inserted for Unicode compatibility. In other words, it turns double-byte characters into their closest single-byte equivalent. If the stringToDecode contains an odd number of bytes, the last byte is ignored.
The ability to handle double-byte characters on "little-endian" processors was added in version 2.0. In previous versions, the uniDecode function always removed the second byte of each pair of bytes, regardless of platform. The ability to convert Unicode text into language-specific encodings was added in version 2.0. In previous versions, the uniDecode function simply removed every other byte. | |||||||||
Tags | text processing |