mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
deps: V8: cherry-pick a7dffcd767be
Original commit message:
[postmortem] Load files using utf-8 to support Python 3
Change-Id: I174d38cc33210c07d1a7596627e1b2d21bb06313
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1895560
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
Cr-Commit-Position: refs/heads/master@{#64717}
Refs: https://github.com/v8/v8/commit/a7dffcd767be6e6122dd3911c8388b5ff76ac590
Backport-PR-URL: https://github.com/nodejs/node/pull/30109
PR-URL: https://github.com/nodejs/node/pull/30218
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
1 parent
5e1da86d9b
commit
593d989e8e
1 file changed
+3
-2
+3
-2
@@ -49,6 +49,7 @@
|
||||
# for py2/py3 compatibility
|
||||
from __future__ import print_function
|
||||
|
||||
import io
|
||||
import re
|
||||
import sys
|
||||
|
||||
@@ -380,7 +381,7 @@ def load_objects():
|
||||
|
||||
|
||||
def load_objects_from_file(objfilename, checktypes):
|
||||
objfile = open(objfilename, 'r');
|
||||
objfile = io.open(objfilename, 'r', encoding='utf-8');
|
||||
in_insttype = False;
|
||||
|
||||
typestr = '';
|
||||
@@ -575,7 +576,7 @@ def load_fields():
|
||||
|
||||
|
||||
def load_fields_from_file(filename):
|
||||
inlfile = open(filename, 'r');
|
||||
inlfile = io.open(filename, 'r', encoding='utf-8');
|
||||
|
||||
#
|
||||
# Each class's fields and the corresponding offsets are described in the
|
||||
|
||||
Reference in new issue
Block a user