|WARNING: This technical note refers specifically to Unicode characters that are represented on US English-based Windows Mobile devices. Devices sold outside North America may have additional font support for their specific locales without the requirement of modifying the system fonts. Do not use the instructions in this document if you do not require additional characters or if your device already supports alternative international characters. Some international versions of the Tahoma font have a large number of characters that will occupy a large portion of memory on the device. Do not use these extended versions of Tahoma (e.g. Arabic and Thai) if you are concerned about the memory available for storage on your device. Not all international Windows Mobile devices use Tahoma as the system font. If your device uses another system font (See: http://msdn2.microsoft.com/en-us/library/aa911384.aspx and http://msdn2.microsoft.com/en-us/library/aa911463.aspx ), do not follow the proceeding instructions.|
Section I: What is ‘Unicode’?When M-Business displays a character in the browser, it must take a digital representation of the character sent from the M-Business server and must map it to an entry in a font table. Unicode is the industry standard that takes a large amount of the world’s characters (roughly 100,000 characters) and maps it to specific “code points” (entries) in the font table that is consistent across all fonts. Font developers can develop fonts for multiple languages and know which character should be shown to a user based on the entry number. This mapping between characters and code points is referred to as the “Universal Character Set” (UCS) and is published by the Unicode Consortium ( http://www.unicode.org/ ).
Section II: What characters are missing by default?Since Windows Mobile is designed to be a low-memory, low-footprint operating system, full Unicode font support is not installed by default. The three system fonts installed on Pocket PC 2002, Pocket PC 2003, Pocket PC 2003 SE, and Windows Mobile 5 are:
- Tahoma ( \Windows\tahoma.ttf )
- Tahoma (Bold) ( \Windows\tahomabd.ttf )
- Courier New ( \Windows\cour.ttf )
Note that the Windows XP version of Tahoma includes all of the Unicode characters (Fig. 2):Fig. 1 – Cyrillic Supplementary (U+0492 to U+04F9) characters are not included by default on Windows Mobile.
Fig. 2 – Cyrillic Supplementary (U+0492 to U+04F9) characters are available on Windows XP’s version of “Tahoma”.
Section III: What characters does M-Business Support?M-Business can display anything on Windows Mobile that is available to the default system font, provided the data from the web server is encoded in a character set that is supported on the device (See: http://www.ianywhere.com/developer/product_manuals/mbusiness_anywhere/65/en/html/mba_appdeven65/appdev-ad-content-languages-charactersets.html ).
For Unicode, “UTF-8” (8-bit UCS/Unicode Translation Format) is the supported encoding to enable Unicode characters on Pocket PC. This means that any data sent to the M-Business client must be “tagged” such that M-Business recognizes the encoding as UTF-8.
For any HTML transmissions, you must include a META tag:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
For XML data, you must specify the encoding in the XSD file, using the “deviceEncoding” attribute: (See: http://www.ianywhere.com/developer/product_manuals/mbusiness_anywhere/65/en/html/mba_appdeven65/appdev-ad-xmlconex-dbcs-support.html )
|<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<xsd:element name="Employees" msch:relation="Employees" type="Employees_type" deviceEncoding="UTF-8" />
<xsd:complexType name="Employees_type" deviceEncoding="UTF-8">
<xsd:attribute name="id" type="xsd:int" deviceEncoding="UTF-8" />
<xsd:attribute name="lastname" type="xsd:string" deviceEncoding="UTF-8" />
<xsd:attribute name="firstname" type="xsd:string" deviceEncoding="UTF-8" />
<xsd:attribute name="phonenumber" type="xsd:string" deviceEncoding="UTF-8" />
<xsd:selector xpath="." />
<xsd:field xpath="@id" />
Section IV: How do I install Unicode supported fonts on the device?The simplest solution to this problem is to replace the default system fonts with their desktop version equivalents that contain the Unicode support that is required for the application.
Step 1. Copy the font files from C:\Windows\Fonts to a local folder
- Go to “Start”, “Settings”, “Control Panel”
- Switch to “Classic View” if you are looking at the “Category View”
- Click on “Fonts”
- Hold down “Ctrl” and select (Fig. 3):
- Courier New (TrueType)
- Tahoma (TrueType)
- Tahoma Bold (TrueType)
Fig. 3 – Selecting the required fonts
- Click on “Edit”, “Copy”
- Go to a folder on your computer, and click “Edit”, “Paste” (Fig. 4). Ensure the filenames match as illustrated:
Fig. 4 – Copying the files to a local folder.
- Highlight all three files, and go to “Edit”, “Copy”
- Cradle your device and ensure ActiveSync connects successfully
- Click on “My Computer”, “Mobile Device”, “My Windows Mobile-Based Device”, “Windows”
- Click on “Edit”, “Paste” (Fig. 5)
Fig. 5– Copying the Unicode-enabled fonts on to the device
- You will see a window appear while the fonts are copying. If a message prompts you to overwrite, click on “Yes to All”. If you get a sharing violation message, soft-reset your device, and try Step 2 again.
Fig. 6 – The file-copy dialog window
Section V: Checking to see if the Unicode characters display correctlyCreate a channel and sync it to test the M-Business browser’s Unicode capability (Fig. 7).
Title: UTF-8 Test
Description: A test channel for UTF-8 compliance
Channel Size: 40KB
Link Depth: 0
Fig. 7 – Creating a channel to test UTF-8
Notice that most of the characters will display, but some characters will not. This is a known limitation of the distributed Tahoma font (Fig. 8).
Fig. 8 – Some Armenian characters will not display correctly
(Note: For supported Unicode ranges/codepages in the Tahoma font, see: http://www.microsoft.com/typography/fonts/font.aspx?FID=19&FNAME=Tahoma )
We can also check our third-party software to see which glyphs are now available (Fig. 9):
Fig. 9 – Additional Cyrillic Supplementary (U+0492 to U+04F9) characters are now available on Windows Mobile.