I have problems with Swedish national characters when using Rust in Visual Studio Code in Windows 11. It can be shown with the following program:
fn main() {
let abc = " ååå
ööö
äää";
println!("<---{}--->", abc);
}
When the program is run from the command line using cargo run
, the output is as follows:
<--- ååå
ööö
äää--->
Strangely, spaces are added at the beginning of lines 2 and 3. However, when the program is run in Visual Studio Code, the Swedish characters get distorted.
<--- ååå
├╢├╢├╢
äää--->
How can I solve it? I work with text processing and this is a major problem.
EDIT: Since the problem doesn't appear on many systems, I add the technical data: Windows 11 Pro Version 10.0.22621 Build 22621; Visual Studio Code Version: 1.73.1 (user setup) Date: 2022-11-09 Chromium: 102.0.5005.167 Node.js: 16.14.2 Sandboxed: No.