Skip to content

Commit f6f6fd5

Browse files
committed
fix: set LANG and LC_ALL for emailconverter command
Ensures UTF-8 compatibility when passing filenames to the external emailconverter command. Nextcloud filenames are UTF-8 encoded, so the process requires a UTF-8 locale setting to handle them correctly. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 parent f57c7cf commit f6f6fd5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/Service/ConversionService.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ public function convert(string $filePath): string {
4242
$resultPath
4343
];
4444

45-
$process = proc_open($command, $descriptors, $pipes);
45+
$env = [
46+
'LANG=C.UTF-8',
47+
'LC_ALL=C.UTF-8',
48+
];
49+
50+
$process = proc_open($command, $descriptors, $pipes, null, $env);
4651
if ($process === false) {
4752
throw new ConversionException('Could not invoke emailconverter.jar');
4853
}

0 commit comments

Comments
 (0)