Skip to content

Commit

Permalink
This fixes #86.
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed Dec 1, 2022
1 parent ee25dff commit c7776d2
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.apache.tika.utils.ProcessUtils;
import org.apache.tika.utils.StreamGobbler;
import org.apache.tika.utils.StringUtils;
import org.apache.tika.utils.SystemUtils;

public class BatchProcess {

Expand Down Expand Up @@ -221,9 +222,12 @@ public BatchRunner(Path tikaConfig, BatchProcessConfig batchProcessConfig) {
public Integer call() throws Exception {
List<String> commandLine = buildCommandLine();


process = new ProcessBuilder(commandLine).inheritIO() //TODO -- for dev purposes only
.start();
ProcessBuilder pb = new ProcessBuilder(commandLine);
if (SystemUtils.IS_OS_UNIX) {
//Make sure that file names are read as utf-8
pb.environment().put("LC_CTYPE", "C.UTF-8");
}
process = pb.inheritIO().start();
mutableStatus.set(STATUS.RUNNING);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("process {}", process.isAlive());
Expand Down

0 comments on commit c7776d2

Please sign in to comment.