Skip to content

Commit 0f8cd09

Browse files
authored
Force to use UTF-8 encoding (issue#10)
1 parent 7057269 commit 0f8cd09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extract_jni.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def parse_apk(apkfile, workers, fn_match=None, outfile=None):
312312
if not outfile:
313313
console.print_json(data=output)
314314
else:
315-
with open(outfile, 'w') as f:
315+
with open(outfile, "w", encoding="utf-8") as f:
316316
json.dump(output, f, indent=2, ensure_ascii=False)
317317

318318

@@ -323,4 +323,4 @@ def parse_apk(apkfile, workers, fn_match=None, outfile=None):
323323
parser.add_argument('-j', dest='workers', type=int, default=multiprocessing.cpu_count(), help='parse apk with multiple workers(processes)')
324324
parser.add_argument('-o', dest='outfile', help='save JNI methods as formatted json file')
325325
args = parser.parse_args()
326-
parse_apk(args.apk, args.workers, outfile=args.outfile)
326+
parse_apk(args.apk, args.workers, outfile=args.outfile)

0 commit comments

Comments
 (0)