Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jnigen] Use utf-8 for standard error and standard out encoding #1141

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading