We're updating the issue view to help you get more done. 

clojure.xml/emit should be encoding-aware

Description

clojure.xml/emit blithely asserts that it's writing UTF-8 despite the fact that it's actually writing characters, not bytes. Encoding isn't actually decided until actual bytes are written. This forces clients using clojure.xml/emit to write XML back to disk to use UTF-8. They won't know to do that unless they actually peek at the implementation. This behavior isn't documented.

1 2 3 (defn emit [x] (println "<?xml version='1.0' encoding='UTF-8'?>") (emit-element x))

Environment

None

Status

Assignee

Unassigned

Reporter

import

Labels

None

Approval

None

Patch

None

Fix versions

Priority