Closed
Description
The documentation for buffer.transcode
states:
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
).