You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kevinburke opened this issue
Sep 26, 2017
· 3 comments
Labels
bufferIssues and PRs related to the buffer subsystem.docIssues and PRs related to the documentations.encodingIssues and PRs related to the TextEncoder and TextDecoder APIs.i18n-apiIssues and PRs related to the i18n implementation.
Throws if the fromEnc or toEnc specify invalid character encodings or if conversion from fromEnc to toEnc is not permitted.
However, the documentation does not specify which encodings are valid.
(I was trying to transcode a Buffer into a Buffer with the same bytes, base64 encoded. My goal was to replace the + and / characters with - and _ without needing to create an entirely new string or call .replace).
The text was updated successfully, but these errors were encountered:
vsemozhetbyt
added
buffer
Issues and PRs related to the buffer subsystem.
doc
Issues and PRs related to the documentations.
i18n-api
Issues and PRs related to the i18n implementation.
encoding
Issues and PRs related to the TextEncoder and TextDecoder APIs.
labels
Sep 26, 2017
At least one character encoding specified there ('base64') is not valid for buffer.transcode; when you try to use it an error is thrown. It would be good to know if there are others without having to read the source code, or write demonstration code enumerating the possible encoding pairs.
bufferIssues and PRs related to the buffer subsystem.docIssues and PRs related to the documentations.encodingIssues and PRs related to the TextEncoder and TextDecoder APIs.i18n-apiIssues and PRs related to the i18n implementation.
The documentation for
buffer.transcode
states:However, the documentation does not specify which encodings are valid.
(I was trying to transcode a Buffer into a Buffer with the same bytes, base64 encoded. My goal was to replace the
+
and/
characters with-
and_
without needing to create an entirely new string or call.replace
).The text was updated successfully, but these errors were encountered: