Skip to content

Commit

Permalink
[jnigen] Use utf-8 for standard error and standard out encoding (#1141)
Browse files Browse the repository at this point in the history
  • Loading branch information
HosseinYousefi authored May 14, 2024
1 parent 89c00ed commit e8b7d6c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkgs/jni/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.9.1-wip
## 0.9.1

- Fix compilation on macOS for consumers that don't use JNI on macOS (which is still not supported) ([#1122](https://github.com/dart-lang/native/pull/1122)).
- Fixed compilation on macOS for consumers that don't use JNI on macOS (which is
still not supported) ([#1122](https://github.com/dart-lang/native/pull/1122)).

## 0.9.0

Expand Down
6 changes: 6 additions & 0 deletions pkgs/jnigen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.9.1

- Fixed a bug in summarizer where standard output would use the default encoding
of the operating system and therefore breaking the UTF-8 decoding for some
locales.

## 0.9.0

- **Breaking Change** ([#660](https://github.com/dart-lang/native/issues/660)):
Expand Down
8 changes: 6 additions & 2 deletions pkgs/jnigen/lib/src/summary/summary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ class SummarizerCommand {
args.addAll(extraArgs);
args.addAll(classes);
log.info('execute $exec ${args.join(' ')}');
final proc = await Process.start(exec, args,
workingDirectory: workingDirectory?.toFilePath() ?? '.');
final proc = await Process.start(
exec,
args,
workingDirectory: workingDirectory?.toFilePath() ?? '.',
environment: {'JAVA_TOOL_OPTIONS': '-Dfile.encoding=UTF8'},
);
return proc;
}
}
Expand Down

0 comments on commit e8b7d6c

Please sign in to comment.