8.4 I think some special characters are breaking my code or links, what can I do? |
Anchors/links sometimes contain other characters than A-Z and 0-9. Typical special characters are ~ (tilde) and & (ampersand). If you're coding "by the book", you should tell the WAP browser which character set you are using. This is done in the XML definition at the start of every deck such as this:
<?xml version="1.0" encoding="iso-8859-1"?>"iso-8859-1" is the real name of the Latin1 character set. This should in most cases give you what you want. However, its common to escape ALL escape-able characters. Even if you have specified the character set - but you will find that it's probably not necessary. Character entities are "standardized" names for certain special characters, for instance the & (ampersand) character with "&". For a complete list of such character and their character entities, see the Character Entity Reference Chart Note that at present it seems that most browsers have problems decoding the actual name of the entity (HTML4 entities). For instance, Nokia lists compatibility with only seven entity names, "quot", "amp", "apos", "lt", "gt", "nbsp" and "shy". However, the browser can display almost all the characters, but only by using their decimal code (which is available in the link above). Nokia's browsers actually crash if they receive an entity name it does not support. By using a HTML or WML capable browser (although not very pretty in HTML format :-), you can access an online entity name listing at The table is also reachable from the example applications list at DEMO The first section will let you choose which set of characters to display, Latin1, Latin1 Mathematical and Greek symbols, and finally the Latin1 Markup symbols. Notice that the lists are split up because of the size of the decks they produce. The actual list shows the entity name, the entity's decimal number and the actual symbol. From that you should be able to tell which symbols a given browser can display. Note that the above online list does not set the "charset=iso-8859-1" (Latin1's real name) XML definition. |
[ Main ] [ 08 - Troubleshooting ] |
© Copyright The Wireless FAQ. All Rights Reserved. Terms | Site Map |