Overview of locales and code pages
Locales
ArcPad supports all the locales that are supported by the device’s operating system. ArcPad includes a number of language packs, which contain the translation of the user interface into a specific language. The list of available language packs is provided in the Read Me file included with ArcPad. The language packs included with ArcPad are automatically installed on the PC but need to be individually installed on Windows Mobile devices. Once a language pack has been installed on a device, it can be activated by selecting the locale on the Locale tab of the ArcPad Options dialog box.
To use a language pack with ArcPad, the locale and code set must be supported on the device. The Locale tab of the ArcPad Options dialog box only lists the locales supported on the device. Your device’s operating system does not need to be localized for a particular language to use the language in ArcPad, but the operating system does need to support the language and code page. For example, you can install the Chinese fonts, or code pages, on an English Windows XP PC. Once you have done this, you can use the Chinese locale with ArcPad, even though the Windows XP operating system is still in English.
Similarly, you do not have to use a particular language pack for ArcPad to enter and view data in that language. ArcPad supports entering and displaying data in any language as long as the following two requirements are met:
- The language, or locale, is supported by the device’s operating system.
- The language is supported by the data file used for storing the data.
Language support for shapefiles is determined by the code page associated with the shapefile. The default code page for shapefiles is 1252, i.e. Western European ANSI. You need to specify the code page for the shapefile if you intend to store data using any non-Western European language.
ArcPad AXF files use Unicode for storing characters. Since Unicode supports all languages, ArcPad AXF files support all languages. You do not need to set a code page for ArcPad AXF files.
Code pages
ArcPad automatically recognizes a shapefile’s code page if a supported language driver ID (LDID) is found in the header of the shapefile’s DBF table (in the 29th byte). If the code page is available on the system, it will be used to translate the attribute contents and field names into displayable characters.
If a valid LDID is not found in the header of the shapefile’s DBF table, ArcPad looks in the following places to determine the code page:
- If the shapefile has an associated <shapefile>.cpg file, ArcPad uses the code page specified in the <shapefile>.cpg file.
- Otherwise, if a code page has been specified in the associated ArcPad layer file, then ArcPad uses the code page specified in the <shapefile>.apl file (configured in the Layer Editor of ArcPad Studio).
- Otherwise, ArcPad uses the code page associated with the locale set on the Locale tab of the ArcPad Options dialog box.
UTF-8
Universal Transformation Format (UTF-8) is a variable-length character encoding that is able to represent any character in the Unicode standard. The UTF-8 code page equivalent is 65001. Setting the code page for shapefiles to 65001 specifies that all attribute data in the shapefile’s dBASE file will be stored using Unicode encoding.
UTF-8 is the default code page for new shapefiles and QuickProject-generated shapefiles. The code page ID (UTF-8) is stored in a .cpg file associated with the shapefile. The name of the file is the same as the shapefile with a .cpg extension.
Specifying the code page for UTF-8 provides a number of advantages:
- Characters from different code pages can be stored and displayed using a single code page for UTF-8. For example, with UTF-8, it is possible to display both Traditional Chinese and Simplified Chinese characters at the same time.
- Some languages are only supported via Unicode and so can only be displayed when using shapefiles if the code page is set to UTF-8.
- Any Unicode character can be displayed on a device that supports Unicode,
providing that the system font required for the characters is present on the
device.
For example, many PCs in Hong Kong are configured for Traditional Chinese Encoding (code page 950), while the shapefiles are deployed on English Windows Mobile devices that do not support the 950 code page. Specifying the code page as 65001 (UTF-8) and copying the required system font to the device enables the English Windows Mobile devices to display characters in Traditional Chinese.