mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02:00
lib: replace \u2019 with regular ascii quote
The previous commit stores baked-in files with non-ASCII characters as UTF-16. Replace the \u2019 with a regular quote character so that the files they're in can be stored as one-byte strings. The UTF-16 functionality is still tested by the Unicode diagram in lib/timers.js. PR-URL: https://github.com/nodejs/node/pull/11129 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
c30fc8d495
commit
fd8587eb38
2 changed files with 2 additions and 2 deletions
|
@ -217,7 +217,7 @@ function fromString(string, encoding) {
|
|||
var b = new FastBuffer(allocPool, poolOffset, length);
|
||||
var actual = b.write(string, encoding);
|
||||
if (actual !== length) {
|
||||
// byteLength() may overestimate. That’s a rare case, though.
|
||||
// byteLength() may overestimate. That's a rare case, though.
|
||||
b = new FastBuffer(allocPool, poolOffset, actual);
|
||||
}
|
||||
poolOffset += actual;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue