Using Different Character Sets with EditLive! for XML

Introduction

Ephox EditLive! for XML supports multiple character sets which allow it to be used in an international environment. The character set used by EditLive! for XML is defined within the XML document loaded into EditLive! for XML. If no character encoding is specified then EditLive! for XML will default to using UTF-8 encoding. The UTF-8 character set supports international character sets.

Supported Character Sets

EditLive! for XML supports the display and usage of the following character sets:

ASCII

American Standard Code for Information Interchange

CP1252

Windows Latin-1

UTF8

Eight-bit Unicode Transformation Format

UTF-16

Sixteen-bit Unicode Transformation Format

ISO2022CN

Sixteen-bit Unicode Transformation Format

ISO2022JP

JIS X 0201, 0208 in ISO 2022 form, Japanese

ISO2022KR

ISO 2022 KR, Korean

ISO8859_1

ISO 8859-1, Latin alphabet No. 1

ISO8859_2

ISO 8859-2, Latin alphabet No. 2

ISO8859_3

ISO 8859-3, Latin alphabet No. 3

ISO8859_4

ISO 8859-4, Latin alphabet No. 4

ISO8859_5

ISO 8859-5, Latin/Cyrillic alphabet

ISO8859_6

ISO 8859-6, Latin/Arabic alphabet

ISO8859_7

ISO 8859-7, Latin/Greek alphabet

ISO8859_8

ISO 8859-8, Latin/Hebrew alphabet

ISO8859_9

ISO 8859-9, Latin alphabet No. 5

ISO8859_13

ISO 8859-13, Latin alphabet No. 7

ISO8859_15

ISO 8859-15, Latin alphabet No. 9

SJIS

Shift-JIS, Japanese

Big5

Chinese Big5.

Setting the Character Set via the Document

The character set to be used within EditLive! for XML can be specified in the document to be loaded into EditLive! for XML. To set the character set in this way the XML declaration at the start of the document must specify the character set of the document to be loaded into EditLive! for XML. This is done by specifying a value for the encoding attribute. If no character set is specified then EditLive! for XML will use UTF-8 by default.

Example 12.1. Setting the Character Set to ASCII via the XML Declaration

<?xml version="1.0" encoding="ASCII"?>

Summary

The character set for use with an instance of EditLive! for XML can be specified within the document loaded into EditLive! for XML. This declaration must be made inside the XML declaration at the beginning of the file using the encoding attribute. If no character set is specified then EditLive! for XML will use UTF-8 by default.