-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readers? #91
Comments
It sounds like you want something that implements not I’m experimenting with things that could help here. I’ll post again where there’s something more fully formed to show. |
Sorry for my vague description. I meant some kind of adapter between a stream of bytes in for examples Windows-1252 and a stream of bytes in utf-8. The unicode stream would be very nice, but there's a lot of code that already works with |
That sounds like it could be built on top of "raw" decoders. |
… probably with an impl of |
Any progress? |
I just came across the same myself. Would this be something that is in the scope of the crate? |
I have to write these impls for a project of mine and would also like to hear whether @lifthrasiir thinks they might be in scope for this crate. I've also started a conversation on the |
To cross pollinate a bit here from the The big idea here is that implementing these traits is quite tricky, and neither of our implementations is fully correct. Mine gets most of the way there, but doesn't support single-byte-reads, which means the |
I wonder if the traits are misdesigned for non utf-8 usage. It's weird that they work with both strings and bytes. |
In my case, I very much wanted to ever avoid materializing a |
It would be convenient to have an object that implements
Read
, so one could for example easily and efficiently read from a file in an encoding other than utf-8.The text was updated successfully, but these errors were encountered: