Skip to content

Commit

Permalink
Use a defined encoding (UTF-8) for the argument files.
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Jul 4, 2024
1 parent 5b2be48 commit cb8dac8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'maven-publish'
id "net.neoforged.gradleutils" version "3.0.0-alpha.13"
id "net.neoforged.gradleutils" version "3.0.0"
}

group = 'net.neoforged'
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/neoforged/devlaunch/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
*/
package net.neoforged.devlaunch;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.LineNumberReader;
import java.io.StreamTokenizer;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -82,7 +83,7 @@ private static void expandArgumentFile(String fileName, List<String> arguments,

private static void expandValidArgumentFile(String fileName, File file, List<String> arguments, Set<String> visited) {
List<String> result = new ArrayList<>();
try (LineNumberReader reader = new LineNumberReader(new FileReader(file))) {
try (var reader = new BufferedReader(new FileReader(file, StandardCharsets.UTF_8))) {
visited.add(file.getAbsolutePath());
StreamTokenizer tok = new StreamTokenizer(reader);
tok.resetSyntax();
Expand Down

0 comments on commit cb8dac8

Please sign in to comment.