When your XML input isn\'t encoded in UTF-8, the Unmarshal
function of the xml package seems to require a CharsetReader
.
Where do you find
There aren't any provided in the go distribution at the moment, or anywhere else I can find. Not surprising as that hook is less than a month old at the time of writing.
Since a CharsetReader is defined as CharsetReader func(charset string, input io.Reader) (io.Reader, os.Error)
, you could make your own.
There's one example in the tests, but that might not be exactly useful to you.