Repository: flutter
Issue: FormatException: Invalid UTF-8 byte (at offset 60)
Labels: waiting for customer response,in triage

### Steps to reproduce

Hello, I have encountered a problem. I am using a Chinese made Linux aarch64 architecture computer to run the Flutter project on Android Studio. My Flutter project previously ran well on Windows and Linux x86. However, when I ran the project on a Linux aarch64 architecture computer, I found that the software was garbled in Chinese characters, and the numbers and letters were displayed normally. The computer code for Linux aarch64 architecture is zh_CN.UTF-8, and my project code code is UTF-8. I don't know why the Chinese characters are garbled. Thank you for your help!

### Expected results

```
phm@phm-pc:~/Android/padhelper/padhelper$ flutter doctor -vv
[  +28 ms] executing: uname -m
[  +11 ms] Exit code 0 from: uname -m
[        ] aarch64
[  +89 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[   +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +7 ms] Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[ +102 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +258 ms] executing: /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java -version
[  +14 ms] Exit code 2 from: /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java -version
[        ] /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java: 1: ELF: Permission denied
           /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java: 2: 
                                                                                              : Permission denied
           /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java: 3: : Permission denied
           /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java: 4: Syntax error: word unexpected (expecting ")")
[  +32 ms] executing: /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java -version
[   +9 ms] Exit code 2 from: /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java -version
[        ] /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java: 1: ELF: Permission denied
           /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java: 2: 
                                                                                              : Permission denied
           /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java: 3: : Permission denied
           /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio/jbr/bin/java: 4: Syntax error: word unexpected (expecting ")")
[  +85 ms] executing: [/home/phm/Android/flutterCode/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%ar
[   +9 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%ar
[        ] 3 周前
[ +336 ms] executing: /home/phm/Android/Sdk/platform-tools/adb devices -l
[  +62 ms] [✓] Flutter (Channel stable, 3.27.1, on Kylin V10 SP1 5.4.18-85-generic, locale zh_CN.UTF-8)
[   +1 ms]     • Flutter version 3.27.1 on channel stable at /home/phm/Android/flutterCode/flutter
[        ]     • Upstream repository https://github.com/flutter/flutter.git
[        ]     • Framework revision 17025dd882 (3 周前), 2024-12-17 03:23:09 +0900
[        ]     • Engine revision cb4b5fff73
[        ]     • Dart version 3.6.0
[        ]     • DevTools version 2.40.2
[        ]     • Pub download mirror https://pub.flutter-io.cn
[        ]     • Flutter download mirror https://storage.flutter-io.cn
[  +20 ms] [!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[        ]     • Android SDK at /home/phm/Android/Sdk
[        ]     • Platform android-34, build-tools 34.0.0
[  +11 ms]     • Java binary at:

/home/phm/Android/FlutterSDK/FlutterSDK/flutter_linux_3.24.5-stable/flutter/bin:/home/phm/Android/flutterCode/flutter/bin:/home/phm/Android/jdk-23_linux-aarch64_bin/jdk-23.0.1/bin

:/home/dmdba/dmdbms/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/phm/Android/jdk-23_linux-aarch64_bin/jdk-23.0.1/bin/java
[   +9 ms]     ✗ Cannot execute

/home/phm/Android/FlutterSDK/FlutterSDK/flutter_linux_3.24.5-stable/flutter/bin:/home/phm/Android/flutterCode/flutter/bin:/home/phm/Android/jdk-23_linux-aarch64_bin/jdk-23.0.1/bin

:/home/dmdba/dmdbms/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/phm/Android/jdk-23_linux-aarch64_bin/jdk-23.0.1/bin/java to
                 determine the version
[  +13 ms] [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
[        ]     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[ +320 ms] [✓] Linux toolchain - develop for Linux desktop
[        ]     • clang version 10.0.0-4kylin1
[        ]     • cmake version 3.16.3
[        ]     • ninja version 1.10.0
[        ]     • pkg-config version 0.29.1
[   +9 ms] [!] Android Studio (version 2024.2)
[        ]     • Android Studio at /home/phm/Android/android-studio-2024.2.1.12-linux/android-studio
[        ]     • Flutter plugin version 83.0.3
[        ]     • Dart plugin can be installed from:
[        ]       🔨 https://plugins.jetbrains.com/plugin/6351-dart
[   +1 ms]     ✗ Unable to determine bundled Java version.
[        ]     • Try updating or re-installing Android Studio.
[   +9 ms] [✓] VS Code (version 1.96.2)
[        ]     • VS Code at /usr/share/code
[        ]     • Flutter extension version 3.102.0
[  +45 ms] [☠] Connected device (the doctor check crashed)
[        ]     ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at
https://github.com/flutter/flutter/issues.
[   +1 ms]     ✗ FormatException: Invalid UTF-8 byte (at offset 60)
[        ]     • #0      _Utf8Decoder.convertChunked (dart:convert-patch/convert_patch.dart:1950:7)
[        ]       #1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:304:28)
[        ]       #2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:300:5)
[        ]       #3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:69:18)
[        ]       #4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
[        ]       #5      _rootRunUnary (dart:async/zone.dart:1422:47)
[        ]       #6      _CustomZone.runUnary (dart:async/zone.dart:1324:19)
[        ]       #7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1233:7)
[        ]       #8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366:11)
[        ]       #9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297:7)
[        ]       #10     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:777:19)
[        ]       #11     _StreamController._add (dart:async/stream_controller.dart:651:7)
[        ]       #12     _StreamController.add (dart:async/stream_controller.dart:606:5)
[        ]       #13     _Socket._onData (dart:io-patch/socket_patch.dart:2455:41)
[        ]       #14     _rootRunUnary (dart:async/zone.dart:1430:13)
[        ]       #15     _CustomZone.runUnary (dart:async/zone.dart:1324:19)
[        ]       #16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1233:7)
[        ]       #17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366:11)
[        ]       #18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297:7)
[        ]       #19     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:777:19)
[        ]       #20     _StreamController._add (dart:async/stream_controller.dart:651:7)
[        ]       #21     _StreamController.add (dart:async/stream_controller.dart:606:5)
[        ]       #22     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1942:33)
[        ]       #23     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1385:14)
[        ]       #24     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
[        ]       #25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
[        ]       #26     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
[        ]       #27     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)
[ +695 ms] [✓] Network resources
[        ]     • All expected network resources are available.
[        ] ! Doctor found issues in 4 categories.
[  +18 ms] "flutter doctor" took 2,110ms.
[ +134 ms] ensureAnalyticsSent: 110ms
[        ] Running 1 shutdown hook
[   +1 ms] Shutdown hooks complete
[  +10 ms] exiting with code 0
```

### Actual results

![2025-01-07_16-52-39](https://github.com/user-attachments/assets/d3a91f24-58e5-4a16-9ec8-109662c40a25)


### Code sample

<details open><summary>Code sample</summary>

```dart
[Paste your code here]
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>