quickfix icon indicating copy to clipboard operation
quickfix copied to clipboard

decoder.CharsetReader required

Open gpmn opened this issue 6 years ago • 0 comments

https://github.com/quickfixgo/quickfix/blob/bbe42d9f62205321fa6b61c46f22fe073b814467/datadictionary/datadictionary.go#L329

decoder := xml.NewDecoder(xmlFile)
decoder.CharsetReader = func(encoding string, input io.Reader) (io.Reader, error) {
	return input, nil
}
if err := decoder.Decode(doc); err != nil {
	return nil, err
}

s.a. https://stackoverflow.com/questions/50812137/xml-encoding-utf-16-declared-but-decoder-charsetreader-is-nil-unmarshal-succe

unless the decoder.CharsetReader, it could not parse such xml file : https://apiwiki.fxcorporate.com/api/fix/docs/FIXFXCM10.xml

gpmn avatar Feb 22 '19 03:02 gpmn