Part IV Presentation of Mobile Content
Note: You must include the alt attribute on each
where="ImgWBMPSupported" ...>
Work with Character Sets
Character encoding is an algorithmic process that specifies how human-readable characters are
converted into bytes for storage or transmission. Characters in a language (or set of languages)
are mapped to numbers represented by bytes (or octets). Character decoding is the process of
converting bytes into characters.
To avoid encoding errors during the process of storing, transmitting and displaying a document
on the web, a single consistent method of encoding / decoding should be used throughout.
This document explains how to avoid and resolve encoding problems.
About Character Encoding/Decoding
Character encoding is a method of converting characters into bytes and decoding is a method of
converting bytes into characters.
The standard character set for computers has traditionally been ASCII (American Standard Code
for Information Interchange). No provision is made in ASCII for foreign characters or specialized
symbols. Hence, various so-called "extended ASCII" sets have been developed to provide these
symbols. However, the Web has adopted an extended character set, ISO 8859-1 (otherwise
known as ISO Latin-1), as its standard.
In addition, to avoid a preference for one language over another, HTML 4.0 has adopted Unicode
as its official document character set. Unicode is attempting to create a single character set under
which every character, from every language in every region can be represented.
Encode Mechanisms
An application must select a character encoding / decoding method when it is opening, validating
or displaying a HTML document. For documents in English and most other Western European
languages, the character encoding ISO-8859-1 is typically used.
There are a number of mechanisms within the HTTP, XML and HTML protocols for specifying
the character encoding:
•
Unicode encoded-documents commonly use Byte Order Marks (BOM) to inform the
decoding software which algorithm needs to be used to decode the byte stream correctly. This
is simply a set of defined lead bytes that mark the stream as being of a particular type.
•
The HTTP protocol defines a response header called "Content-Type" which can include the
character set name as part of its value (when the mime-type is text/*). The HTTP server needs
to be configured to set this header. For example, to specify that an HTML document uses
ISO-8859-1, a server would send the following header:
Content-Type: text/html; charset=ISO-8859-1
In XML, the XML declaration can contain the document encoding:
<?xml version="1.0" encoding="ISO-8859-1"?>
•
In HTML, a <meta> tag can be used to define the document encoding
<meta http-equiv="Content-Type" content="text/ html;
charset=ISO-8859-1" />
108 - BEA WebLogic Mobility Server User Guide
<mm:img>
as the final image in the list.
tag, and you must specify
<mm:img
Need help?
Do you have a question about the WebLogic and is the answer not in the manual?