Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc: Buffer.toString(): add note about invalid data
PR-URL: #30706
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
  • Loading branch information
jgehrcke authored and BethGriggs committed Feb 6, 2020
1 parent a152458 commit ab73047
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/buffer.md
Expand Up @@ -2162,6 +2162,8 @@ added: v0.1.90

Decodes `buf` to a string according to the specified character encoding in
`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
If a byte sequence in the input is not valid in the given `encoding` then
it is replaced with the replacement character `U+FFFD`.

The maximum length of a string instance (in UTF-16 code units) is available
as [`buffer.constants.MAX_STRING_LENGTH`][].
Expand Down

0 comments on commit ab73047

Please sign in to comment.