Skip to content

Commit

Permalink
Better charset recognition method
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanarns committed Oct 3, 2023
1 parent bb1288d commit 94c50e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ghidra_scripts/FnidUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -37,7 +38,7 @@ private static void loadFnids(GhidraScript script) throws Exception {
file = script.askFile("Locate nids.txt", "Load");
}

List<String> list = FileUtils.readLines(file,"ascii");
List<String> list = FileUtils.readLines(file,Charset.defaultCharset());
for (String s : list) {
final String[] split = s.split(" ");
fnids.put(split[0], split[1]);
Expand Down

0 comments on commit 94c50e5

Please sign in to comment.