Customizing HTML Templates Tutorial

Back Home Next
 

Topic 3: The UTF-8 format

Your custom HTML template file must be in UTF-8 format. UTF-8 is a standard format for storing Unicode characters. Wizard.html itself is in UTF-8 format. UTF-8 uses a unique sequence of 1, 2, 3, or 4 bytes to encode each character in the Unicode character set. UTF-8 handles all the Unicode characters, including all the characters of the double-byte-character set languages.

The Notepad editor included with Microsoft Windows 2000 and with Microsoft Windows XP is UTF-8 capable (but the Notepad editor included with Windows NT is not). When Notepad’s Save As dialog appears, expand the Encoding listbox and select UTF-8.

If the UTF-8 formatting of a custom HTML template file becomes corrupted, then the Deployment Editor will refuse to process the file.

You can get by with using an ASCII-only editor to edit your custom HTML template files if you use only characters in the lower-127-character range of the ASCII table. This range includes English lowercase and uppercase letters, numerals, and many punctuation symbols. This approach works because for these characters UTF-8 uses the same 1-byte encodings as ASCII does. But if you use any character in the upper-129-character range of the ASCII table (these are 1-byte ASCII characters that UTF-8 uses 2 or more bytes to encode), then the Deployment Wizard may not be able to process the custom HTML template file or may process it differently than you expect.

Given the risk of your accidentally introducing a character in the upper-129-character ASCII range, you should not use an ASCII-only editor. Instead use a UTF-8 capable editor.

If do you use an ASCII-only editor to view a UTF-8 formatted file such as Wizard.html you will see the 3 characters  at the beginning of the file listing. These are the ASCII representation of a three-byte signature indicating to a UTF-8-capable editor that the file is in UTF-8 format. Do not delete these characters! These characters do not appear when you edit a custom HTML template file with a UTF-8-capable editor such as Notepad.

Back
Home
Next