android: attempt to fix build if the locale is not UTF-8

Reported in https://fosstodon.org/@Karcsesz@equestria.social/112141146083141613

The build would fail with
```
error: unmappable character (0xC2) for encoding US-ASCII
```
Because of the © in the comment
This commit is contained in:
Olivier Goffart 2024-03-24 10:07:21 +01:00
parent b13c03b2a6
commit 2b7834e7c9

View file

@ -1,9 +1,9 @@
use std::path::PathBuf;
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
use std::process::Command;
use std::{env, fs};
use std::path::PathBuf;
fn main() {
if !env::var("TARGET").unwrap().contains("android") {
@ -75,6 +75,7 @@ fn main() {
.arg("-classpath")
.arg(&classpath)
.args(if java_ver != 8 { &["--release", "8"] } else { &[] as &[&str] })
.args(&["-encoding", "UTF-8"])
.output()
.unwrap_or_else(handle_java_err);