KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: UTF-16 versus the Char command
PRODUCT: 4D | VERSION: 11 | PLATFORM: Mac & Win
Published On: July 1, 2009
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

4D v11 SQL supports the UTF-16 character encoding, which provides a character range from 0-65535. The Char command has been updated to support this character range (as opposed to 0-255 for previous versions of 4D or 4D v11 SQL in Compatibility mode).

However it is also important to note that there are 3 characters in this range that are strictly forbidden by the Unicode specification:

0
65534 (FFFE)
65535 (FFFF)

These three character codes should never appear in a string in 4D. Note however that you will not get an error if you attempt to use an expression like Char(0). This is for compatibility reasons as, in compatibility mode, you can still use Char(0).