Skip to content

Commit

Permalink
src: remove final trace of raw encoding
Browse files Browse the repository at this point in the history
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 <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
trevnorris authored and addaleax committed Aug 8, 2016
1 parent 28071a1 commit a059aea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ The character encodings currently supported by Node.js include:
(as defined by the IANA in [RFC1345](https://tools.ietf.org/html/rfc1345),
page 63, to be the Latin-1 supplement block and C0/C1 control codes).

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

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

Expand Down
7 changes: 0 additions & 7 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1493,13 +1493,6 @@ ssize_t DecodeBytes(Isolate* isolate,
enum encoding encoding) {
HandleScope scope(isolate);

if (val->IsArray()) {
fprintf(stderr, "'raw' encoding (array of integers) has been removed. "
"Use 'latin1'.\n");
UNREACHABLE();
return -1;
}

return StringBytes::Size(isolate, val, encoding);
}

Expand Down

1 comment on commit a059aea

@Fishrock123
Copy link
Contributor

@Fishrock123 Fishrock123 commented on a059aea Aug 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR-URL: #8022

Please sign in to comment.