From 94c50e5e07783f19343c7a4c3f70ecab680fdde2 Mon Sep 17 00:00:00 2001 From: Ethan Messinger-Arns Date: Mon, 2 Oct 2023 21:49:10 -0700 Subject: [PATCH] Better charset recognition method --- ghidra_scripts/FnidUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghidra_scripts/FnidUtils.java b/ghidra_scripts/FnidUtils.java index 991a3f4..f64b095 100644 --- a/ghidra_scripts/FnidUtils.java +++ b/ghidra_scripts/FnidUtils.java @@ -2,6 +2,7 @@ import org.apache.commons.io.FileUtils; import java.io.File; +import java.nio.charset.Charset; import java.util.HashMap; import java.util.List; @@ -37,7 +38,7 @@ private static void loadFnids(GhidraScript script) throws Exception { file = script.askFile("Locate nids.txt", "Load"); } - List list = FileUtils.readLines(file,"ascii"); + List list = FileUtils.readLines(file,Charset.defaultCharset()); for (String s : list) { final String[] split = s.split(" "); fnids.put(split[0], split[1]);