From a059aea9a2897ca44d5f171d05a04136b5d7c0d5 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Thu, 2 Jun 2016 11:22:43 -0600 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/7111 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- doc/api/buffer.md | 3 +-- src/node.cc | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index c7ab0b5864..66416f7de0 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -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. diff --git a/src/node.cc b/src/node.cc index b13b1539e7..23b482dbb8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -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); }