|
| |
| Home | Concepts | API | Samples | |
| Home > API | |||
| Unicode Support in ArcSDE 9.2 | |||
|
In ArcSDE 9.2, support for the Unicode standard has been added. Unicode provides a unique number or code for every type of character in every known language. A Unicode-enabled application will be able to handle character data in any language on any operating system. This makes a single implementation of an application sufficient for worldwide deployment. For more information on the Unicode standard, please refer to the Unicode home page. Developing Unicode Applications In previous releases of ArcSDE (8.x through 9.1), the type CHAR always resolved to the ANSI standard character data type. At ArcSDE 9.2, the type CHAR can also be defined to use the UTF16 data type for Unicode. Support for the Unicode data type is enabled by adding the term SDE_UNICODE to the list of preprocessor definitions during compilation. As shown below, if SDE_UNICODE is defined, the C preprocessor resolves the type CHAR to the UTF16 character encoding data type. If SDE_UNICODE is not defined, the type CHAR resolves to the ANSI standard character data type. Thus, when building custom C API applications with ArcSDE 9.2, you can build either Unicode- or ANSI-based applications.
Also, when SDE_UNICODE is defined, all character variables and parameters used in the ArcSDE C API objects and functions will use the Unicode data type. For example, if SDE_UNICODE is defined, the variable column_name in the ArcSDE object SE_COLUMN_DEF and the table parameter in the API function SE_table_delete will both resolve to the Unicode data type SE_WCHAR. Thus, all character variable and parameter values must be in the Unicode character encoding format, not the ANSI character encoding format. The section ‘Character conversion’ explains how to convert data between the Unicode and ANSI encodings.
Upgrading existing applications An existing ArcSDE C API application can be recompiled and built using the
ArcSDE 9.2 client libraries. No additional modifications are required. This
application is an ANSI solution and cannot handle Unicode data. However, this
ANSI application can be used to work with ArcSDE 9.2 Server, as well as ArcSDE
Server from previous releases. Even though ArcSDE 9.2 Server handles data in
Unicode, it automatically handles conversion between Unicode and ANSI. To upgrade existing applications and support Unicode character data,
you will have to update all character-literal data in your application and
recompile, adding the preprocessor definition for Unicode, SDE_UNICODE. Character conversion To convert character data from one character set to another, you can use one of the following options.
See also C API Sample |
|||
| Send your comments to: Site Administrator |
Terms of Use |
PRIVACY |
Copyright © ESRI. |