Skip to content

Commit b483afc

Browse files
trevnorrisrvagg
authored andcommitted
doc: binary encoding is not deprecated
When v8 implemented proper one-byte string support Node's internal "binary" encoding implementation was removed in favor of it. The result was that "binary" encoding effectively became "latin-1" encoding. Because of this and because one-byte strings are natively supported by v8 the buffer encoding is not deprecated and will not be removed. Ref: 83261e7 "deps: update v8 to 3.17.13" PR-URL: #3441 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent f78c8e7 commit b483afc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

doc/api/buffer.markdown

+3-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ encoding method. Here are the different string encodings.
3030

3131
* `'base64'` - Base64 string encoding.
3232

33-
* `'binary'` - A way of encoding raw binary data into strings by using only
34-
the first 8 bits of each character. This encoding method is deprecated and
35-
should be avoided in favor of `Buffer` objects where possible. This encoding
36-
will be removed in future versions of Node.js.
33+
* `'binary'` - A way of encoding the buffer into a one-byte (i.e. `latin-1`)
34+
encoded string. The string `'latin-1'` is not supported. Instead simply pass
35+
`'binary'` to use `'latin-1'` encoding.
3736

3837
* `'hex'` - Encode each byte as two hexadecimal characters.
3938

0 commit comments

Comments
 (0)