Re: [encoding] Serializing internal TextDecoder state? (#7)

I still don't know how we'd pull this off without a rewrite (i.e. move off of or upstream changes to ICU) but regarding my comments about priming encoder state being a security issue above: one approach would just be to be able to ask the decoder to output a byte sequence that would correctly initialize a new instance to the current state. (i.e. any mode switch bytes + buffered lead bytes) when passed in as the start of a stream, rather than via some special initialization API.

(That's probably obvious but documenting it for posterity since I didn't consider it initially.)


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/issues/7#issuecomment-153801650

Received on Wednesday, 4 November 2015 17:52:20 UTC