15.08.2013 Views

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Implementing a Web Site that Uses<br />

UTF-8 Encoding<br />

Implementing UTF-8<br />

UTF-8 is a byte stream encoding scheme that converts each double-byte<br />

Unicode character to one, two or three bytes.<br />

For example, the letter a has an ASCII value of 97 (61 hex). It maps<br />

unchanged in UTF-8 to a single byte with a value of 97.<br />

The single quote character (“) has an ASCII value of 231 (E7 hex). It converts<br />

to two UTF-8 bytes: 195 167 (C3 A7 hex).<br />

The Japanese single quote character (“) has a Unicode value of 27231 (6A5F<br />

hex). It converts to three UTF-8 bytes: 230 169 159 (E6 A9 9F hex).<br />

See Also:<br />

• ”Encoding Special Characters” on page 354<br />

• ”Implementing UTF-8” on page 364<br />

To implement UTF-8, follow these points.<br />

• All Web pages that include the editor or that display the content must set<br />

the charset to UTF-8.<br />

<br />

meta http-equiv=Content-Type content="text/html; charset=utf-8"><br />

...<br />

<br />

• If you are using a database, ensure that it can accept UTF-8 or Unicode<br />

characters.<br />

• Set the configuration data to produce characters for UTF-8.<br />

<br />

(For more information, see ”charencode Attribute” on page 356.)<br />

• Load UTF-8 encoded content into the hidden field for the editor. How you<br />

load this content varies according to your server platform and<br />

environment.<br />

<br />

NOTE You may not be able to use standard HTML encoding functions, such as<br />

HTMLEncode() in ASP.<br />

WARNING! Content stored in JavaScript string variables and in the <strong>eWebEditPro</strong> ActiveX<br />

control is stored as Unicode (double-byte) characters. When a browser reads<br />

<strong>Ektron®</strong> <strong>eWebEditPro</strong> Developer’s <strong>Reference</strong> <strong>Guide</strong>, Release 5.1, Revision 1 364

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!