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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tips<br />

Setting the charset Parameter<br />

Browser Support for UTF-8<br />

Implementing a Web Site that Uses UTF-8 Encoding<br />

the value of the hidden field, the browser converts the UTF-8 byte stream to a<br />

Unicode string for JavaScript. Similarly, when a form is posted to the server, the<br />

browser converts content stored in the hidden field to UTF-8.<br />

• If the UTF-8 byte stream is treated as a Unicode string, the special<br />

characters are corrupted and appear as two or three characters.<br />

• If a Unicode string is interpreted as UTF-8, special characters are corrupted,<br />

and the number of characters is reduced, thereby eliminating some<br />

characters whether or not they are special.<br />

• ASCII characters (A-Z, a-z, 0-9, etc.) always appear correctly because they<br />

have the same value in Unicode and UTF-8.<br />

If you are retrieving the entire document from the editor, set the charset parameter<br />

to utf-8. If you are retrieving only the body contents, you may still set the charset<br />

parameter.<br />

To set the charset parameter to utf-8, update the ewebeditprodefaults.js file so<br />

that charset is set to utf-8. Or, you can use JavaScript to modify<br />

<strong>eWebEditPro</strong>.parameters on the page using this code.<br />

<strong>eWebEditPro</strong>.parameters.editor.charset = "utf-8";<br />

In order for the browser to support UTF-8, the following conditions must exist.<br />

• The browser displaying the editor must support UTF-8.<br />

- Microsoft provides language add-ons for Internet Explorer.<br />

- Because Netscape 4.7x may not display Asian characters on English<br />

Windows (they may appear as question marks '?'), you need a<br />

language-specific version of the operating system and/or browser.<br />

- Netscape 6 supports multiple languages.<br />

• Ensure that the browser encoding uses UTF-8. Set the browser to unicode<br />

using the sequence of menu options indicated below.<br />

- Internet Explorer: View > Encoding > Auto-Select or Unicode (UTF-8)<br />

For More Information about UTF-8<br />

- Netscape 4.7: View > Character Set > Unicode (UTF-8)<br />

- Netscape 6: View > Character Coding > Auto-Detect > Auto-Detect<br />

(All) or Unicode (UTF-8)<br />

• UTF-8 (technical specification) - http://www.ietf.org/rfc/rfc2279.txt<br />

• The ISO 8859 Alphabet Soup - http://czyborra.com/charsets/iso8859.html<br />

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

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

Saved successfully!

Ooh no, something went wrong!