From be9672f5f3d46af68cd2e0d67709ba67dd709518 Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Mon, 13 May 2024 11:59:13 +0200 Subject: [PATCH] [jnigen] Use utf-8 for standard error and standard out encoding --- pkgs/jni/CHANGELOG.md | 5 +++-- pkgs/jnigen/CHANGELOG.md | 6 ++++++ pkgs/jnigen/lib/src/summary/summary.dart | 8 ++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/jni/CHANGELOG.md b/pkgs/jni/CHANGELOG.md index 2c30d7180..01ee4f906 100644 --- a/pkgs/jni/CHANGELOG.md +++ b/pkgs/jni/CHANGELOG.md @@ -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 diff --git a/pkgs/jnigen/CHANGELOG.md b/pkgs/jnigen/CHANGELOG.md index 70cb66f3d..886d57d55 100644 --- a/pkgs/jnigen/CHANGELOG.md +++ b/pkgs/jnigen/CHANGELOG.md @@ -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)): diff --git a/pkgs/jnigen/lib/src/summary/summary.dart b/pkgs/jnigen/lib/src/summary/summary.dart index 87c5819e5..758f22bc4 100644 --- a/pkgs/jnigen/lib/src/summary/summary.dart +++ b/pkgs/jnigen/lib/src/summary/summary.dart @@ -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; } }