XML character set decision $Date: 2008/01/12 17:29:48 $
See XML spec appendix
from now on
FF FE or FE FF?
(opt!) looks like EBCDIC?
no
Conclude UTF-16
Check valid
Check matches any xml encoding given
yes
Determine which
ECBDIC flavor
yes
?xml has
encoding=?
no
done
Check valid
in that encoding
yes
Assume UTF-8
Check valid.
no
Content-Type
has charset
text/* rather than
application/*?
no
Check valid under that encoding
yes
start
Check in US-ASCII
no
yes