set-enc command


set-enc enc-string [id]


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"?>
xsh> set-enc "utf-8"
xsh> ls
<?xml version="1.0" encoding="utf-8"?>
xsh> save# saves the file in UTF-8 encoding

See Also

enc, doc-info


Tree modification