|
|
Editing the Language Pack XML files
Many of the resource files are XML based. Because of this you will need to ensure you don't use any mark-up that may be interpreted as having special meaning. If you need to use any of the characters below within your XML tags you should replace it with the listed entity reference also below. There are five predefined entities (built-in) in XML that you should be aware of:
| Character |
Entity reference |
| & |
& (or & ) |
| < |
< (or < ) |
| > |
> (or > ) |
| " |
" (or " ) |
| ' |
' (or ' ) |
XML documents may contain foreign characters, like Norwegian æ ø å , or French ê è é. To ensure the XML parser understands these characters, you should save your XML resource files as Unicode. In XML, the character encoding is optional and can be given in the XML declaration in the first line of the document, like this:
<?xml version="1.0" encoding="iso-8859-1"?>
For most standard character sets we would suggest utf-8. The XML processor can recognize the following character set names:
- UTF-8
- UTF-16
- ISO-10646-UCS-2
- ISO-10646-UCS-4
- ISO-8859-1 to -9
- ISO-8859-11
- TIS-620
- ISO-2022-JP
- Shift-JIS
- EUC-JP
<?xml version="1.0" encoding="UTF-16"?>
<?xml version="1.0" encoding="EUC-JP"?> (for Japanese character)
<?xml version="1.0" encoding="iso-8859-11"?> (for Thai character )
If no encoding is given XML defaults to UTF-8. If you try to load an XML based resource file into Internet Explorer, you may one of the following error messages indicating encoding problems:
You will get this error message if a character in the XML document does not match the encoding attribute. Normally you will get this error message if your XML document contains "foreign" characters, and the file was saved with a single-byte encoding editor like Notepad, and no encoding attribute was specified.
You will get this error message if your file was saved as Unicode/UTF-16 but the encoding attribute specified a single-byte encoding like Windows-1252, ISO-8859-1 or UTF-8. You can also get this error message if your document was saved with single-byte encoding, but the encoding attribute specified a double-byte encoding like UTF-16.
|
|