Re: [go-nuts] how is xml.Decoder.CharsetReader supposed to be held?

2022-05-06 Thread 'Dan Kortschak' via golang-nuts
On Fri, 2022-05-06 at 15:55 -0700, Ian Lance Taylor wrote: > On Fri, May 6, 2022 at 3:07 AM 'Dan Kortschak' via golang-nuts > wrote: > > > > On Fri, 2022-05-06 at 11:22 +0200, Diego Joss wrote: > > > Does this work for you? > > > > > > https://go.dev/play/p/xLRawVhcRtF > > > > > > > Thanks. No, th

Re: [go-nuts] how is xml.Decoder.CharsetReader supposed to be held?

2022-05-06 Thread Ian Lance Taylor
On Fri, May 6, 2022 at 3:07 AM 'Dan Kortschak' via golang-nuts wrote: > > On Fri, 2022-05-06 at 11:22 +0200, Diego Joss wrote: > > Does this work for you? > > > > https://go.dev/play/p/xLRawVhcRtF > > > > Thanks. No, the documents are in UTF-16, and the procinst will be too. > So it looks more lik

Re: [go-nuts] how is xml.Decoder.CharsetReader supposed to be held?

2022-05-06 Thread 'Dan Kortschak' via golang-nuts
On Fri, 2022-05-06 at 11:22 +0200, Diego Joss wrote: > Does this work for you? > > https://go.dev/play/p/xLRawVhcRtF > Thanks. No, the documents are in UTF-16, and the procinst will be too. So it looks more like this https://go.dev/play/p/4IcXNI3yd2M. If I pull the proc inst out of the UTF-16, the

Re: [go-nuts] how is xml.Decoder.CharsetReader supposed to be held?

2022-05-06 Thread Diego Joss
Does this work for you? https://go.dev/play/p/xLRawVhcRtF -- Diego -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To

[go-nuts] how is xml.Decoder.CharsetReader supposed to be held?

2022-05-05 Thread 'Dan Kortschak' via golang-nuts
I'm in the situation of needing to provide cross-platform xml decoding. So I thought that xml.Decoder.CharsetReader would be the right approach in conjunction with golag.org/x/text/encoding. However, the xml decoder needs to be able to understand the text in order to be able to read the proc inst t