Skip to content

Commit a059aea

Browse files
trevnorrisaddaleax
authored andcommitted
src: remove final trace of raw encoding
A message stuck around in the native API warning users to not use 'raw' encoding. Followed by an abort(). This is no longer necessary since all other signs of 'raw' encoding have been removed. PR-URL: #7111 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 28071a1 commit a059aea

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

doc/api/buffer.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ The character encodings currently supported by Node.js include:
169169
(as defined by the IANA in [RFC1345](https://tools.ietf.org/html/rfc1345),
170170
page 63, to be the Latin-1 supplement block and C0/C1 control codes).
171171

172-
* `'binary'` - (deprecated) A way of encoding the buffer into a one-byte
173-
(`latin1`) encoded string.
172+
* `'binary'` - Alias for `latin1`.
174173

175174
* `'hex'` - Encode each byte as two hexadecimal characters.
176175

src/node.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,13 +1493,6 @@ ssize_t DecodeBytes(Isolate* isolate,
14931493
enum encoding encoding) {
14941494
HandleScope scope(isolate);
14951495

1496-
if (val->IsArray()) {
1497-
fprintf(stderr, "'raw' encoding (array of integers) has been removed. "
1498-
"Use 'latin1'.\n");
1499-
UNREACHABLE();
1500-
return -1;
1501-
}
1502-
15031496
return StringBytes::Size(isolate, val, encoding);
15041497
}
15051498

0 commit comments

Comments
 (0)