4D v14.3ASCII Codes |
||
|
4D v14.3
ASCII Codes
ASCII Codes
Compatibility Note: 4D can function with two character sets: Unicode or ASCII. The Unicode mode is the standard mode used in new databases beginning with version 11 of 4D. The ASCII mode is kept for compatibility reasons in databases created with an earlier version of 4D. This mode is called ASCII compatibility mode. It is possible to apply the Unicode mode to converted databases via the Unicode Mode selector of the Get database parameter and SET DATABASE PARAMETER commands or via the Unicode Mode option found on the Application/Compatibility page of the Preferences: In most cases, the initial functioning of applications is not affected by this setting, since 4D handles any necessary character conversions internally. Moreoever, the most common characters (a-z, 0-9, and so on) have the same value (from1 to 127) in both Unicode and ASCII (Windows and Mac OS). However, certain language statements, more particularly those using commands that work with character strings, may require some adaptation. For example, the statement Char(200) will not return the same value in Unicode as in ASCII. This manual describes the differences in functioning between the Unicode mode and the ASCII compatibility mode for each command concerned. Note: This mode is specific to each database. It is therefore possible to have a Unicode database coexisting with non-Unicode components (or vice versa). When the database is operating in ASCII compatibility mode, on both Macintosh and Windows, the internal database engine and the 4D language work with the Macintosh extended ASCII set. When you enter data using the keyboard (adding records, editing procedures, etc.), 4D uses the internal Altura ASCII conversion scheme to convert what comes from the keyboard (expressed using the Windows set) to the Macintosh set. For example, to enter an “é”, you type ALT+0233, and 4D stores ASCII code 142 in the record. This is transparent to the end user, because when you create a search, you actually type (in the Search editor) the value for which you are looking. Therefore, the value that you typed (ALT+0233) is also translated into ASCII code 142, and you find the value. The codes work the same when you type ALT+0233 in the Procedure editor. However, to look for a character using its ASCII code, you use the Macintosh ASCII code of the character. QUERY(...;[MyFile]MyField="é") ` é is Alt+0233 is the same as: QUERY(...;[MyFile]MyField=Char(142)) ` é is ASCII 142
Note: The grayed out boxes indicate characters that are not available under Windows, or different from Macintosh characters. |
PROPERTIES
Product: 4D SEE ALSO
Character code ARTICLE USAGE
4D Language Reference ( 4D v11 SQL Release 6) |