! Copyright (C) 2005, 2009 Daniel Ehrenberg ! See http://factorcode.org/license.txt for BSD license. USING: kernel namespaces xml.name io.encodings.utf8 xml.elements io.encodings.utf16 xml.tokenize xml.state math ascii sequences io.encodings.string io.encodings combinators ; IN: xml.autoencoding : continue-make-tag ( str -- tag ) parse-name-starting middle-tag end-tag ; : start-utf16le ( -- tag ) utf16le decode-input-if CHAR: ? expect 0 expect check instruct ; : 10xxxxxx? ( ch -- ? ) -6 shift 3 bitand 2 = ; : start, in the case of XML chunks? } case check ;