From fd2ba89053e8f6113e030b4b9d5c1d523cfea438 Mon Sep 17 00:00:00 2001 From: hndrk <51416554+hendriknielaender@users.noreply.github.com> Date: Sat, 17 Feb 2024 14:25:29 +0100 Subject: [PATCH] chore: add windows encoding issue to README.md (#50) * chore: add windows encoding note * chore: add zig issue link * chore: add windows encoding issue to README.md --- README.md | 3 ++- docs/advanced.md | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2342893..ffbf6a6 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,8 @@ zig build test_examples ``` ### Troubleshooting -If Zig doesn't detect changes in a dependency, clear the project's `zig-cache` folder and `~/.cache/zig`. +- If Zig doesn't detect changes in a dependency, clear the project's `zig-cache` folder and `~/.cache/zig`. +- [Non-ASCII characters not printed correctly on Windows](docs/advanced.md) ## Contributing diff --git a/docs/advanced.md b/docs/advanced.md index 5adf3a0..babe370 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -1,3 +1,15 @@ -### Advanced +## Advanced -TODO +### Note for Windows Users + +If you encounter issues with character encoding, such as misrepresentation of "plusminus" (±) or "sigma" (σ) symbols in the benchmark results, it's likely due to Windows using UTF-16 LE encoding by default. To ensure characters are displayed correctly, you can switch your system to use UTF-8 encoding by following these steps: + +1. Open **Control Panel**. +2. Navigate to **Region** > **Administrative** tab. +3. Click on **Change system locale...**. +4. Check the option for **Beta: Use Unicode UTF-8 for worldwide language support**. +5. Click **OK** and restart your computer if prompted. + +This setting will configure your system to use UTF-8 encoding for non-Unicode programs, which should resolve any character display issues in the benchmark output. + +[Zig console output encoding issue](https://github.com/ziglang/zig/issues/7600#issuecomment-753563786)