File Geodatabase API to support Unicode ?

1575
1
09-14-2011 10:07 AM
JasonChen1
New Contributor
Does File Geodatabase API to support Unicode ?

Thanks.
0 Kudos
1 Reply
LanceShipman
Esri Regular Contributor
Yes. In general wstring is used for all character parameters in the API. This implies that we are using wchar_t. But in addition to that, we are using UTF-16 encoded characters in the wchar array. Our contract is that the wstrings that we provide as output are always UTF-16 encoded characters, and we require that developers supply the same for input strings that they use in any API function call.

The exception is XML data. For XML, we use std::string, not wstring. The reason is that our XML is required to use UTF-8 encoded characters. XML is general supplied in UTF-8, and the std::string class is a better fit for working with UTF-8. We have found that using std::string to contain UTF-8 encoded XML strings is very commonly done in the C++ development community.
0 Kudos