-
Notifications
You must be signed in to change notification settings - Fork 22
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
Converting TypedArrays to text #46
Comments
Also when using the |
The character corruption issue has been fixed in 2.0.6. |
The API of the library was written so that it returns typed arrays no matter what the node was. Also, any text is converted to UTF-8, regardless of the input. Therefore, i don't quite see the benefit for this approach, as it's just one call to the TextEncoder... |
Well one of the problem this library has is that, for example, it converts base64 string into a typed array, then it converts them into a regular string and then again into a typed array. This unnecessary conversion is the reason why sometimes you get corrupt data when using this library. |
This library converts
text/plain
data toUint8Array
by default.Why not preserve the
_bodyBuffer
content on the_emitBody
call instead of discarding it so we don't have to convert it back to text for representation?If there is a reason for this behavior you should consider an option to specify how to get the results of the parser.
The text was updated successfully, but these errors were encountered: