set-enc command


Usage

set-enc enc-string [id]

Description

Changes character encoding of a given document. If no document id is given, the command applies to the current document. This has two effects: changing the XMLDecl encoding declaration in the document prolog to display the new encoding and making all future save operations on the document default to the given charset.

Example 1.

xsh> ls
<?xml version="1.0" encoding="iso-8859-1"?>
<foo>...</foo>
xsh> set-enc "utf-8"
xsh> ls
<?xml version="1.0" encoding="utf-8"?>
<foo>...</foo>
xsh> save# saves the file in UTF-8 encoding

See Also

enc, doc-info

Sections

Tree modification