Tech Tip: TEXT TO BLOB, Unicode, and Text Greater than 32K
PRODUCT: 4D | VERSION: 11.4 | PLATFORM: Mac & Win
Published On: October 22, 2009
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
When running a 4D v11 SQL applilcation in Unicode mode there are three new 4D Constants that can be used with the 4D Command TEXT TO BLOB
- UTF8 C string
- UTF8 Text with length
- UTF8 Text without length
The four old 4D constants (Mac C string, Mac Pascal string, Mac Text with length, Mac Text without length) are still present for compatibility to "force" conversion using the Mac Roman character set (used in previous versions of 4D).
A side effect of using the old 4D constants is that the "Mac" constants cannot work with text greater than 32KB. When used with text greater than 32KB, the text stored within the target BLOB will be truncated to 32KB.
For converted databases running in Unicode mode where text variables and fields of up to 2GB are possible, the "Mac" constants should be replaced with the "UTF8" constants.