Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bc23dfe

Browse filesBrowse files
jgehrcketargos
authored andcommitted
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>
1 parent d60da08 commit bc23dfe
Copy full SHA for bc23dfe

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/buffer.md‎

Copy file name to clipboardExpand all lines: doc/api/buffer.md
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2162,6 +2162,8 @@ added: v0.1.90
21622162

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

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.