Hello. Total newbie here. I'm learning several technologies for a qualification as System Administrator and some of them involve programming using the Microsoft/.NET stack (C#, JS, SQL Server, XSLT). I'm still on the basics, but a few decades ago (god I'm old...) I had a semester of programming with Pascal and some of it stuck.
At the same time as I'm learning C# (it's going well) I found out about Rust (the Youtube algo likes you guys!) and I share many values of the language.
My teacher specifically said I should install VS Community because I would expose myself to random breakage with VSCode. There's not a lot of info about setting up Rust on VS Community but I followed this tutorial (thanks, Jonathan!) which was for VS2017 but on my 2019 seems to be working. Then I started with the Rust Book, and on chapter 2 (the guessing game) fell through the cracks.
I have already programmed a guessing game on C# so I thought it would be easy, but then as soon as I do a println!() that includes any "special" non-ASCII characters (the initial user prompts), cargo will not even build.
error: couldn't read src\main.rs: stream did not contain valid UTF-8
--verbose
Caused by:
process didn't exit successfully:rustc --edition=2018 --crate-name jogo_adivinha src\main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=6180934d13871009 -C extra-filename=-61 80934d13871009 --out-dir "E:\OneDrive - Cinel\VStudio\rust\projects\jogo_adivinha\target\debug\deps" -C "incremental=E:\OneDrive - Cinel\VStudio\rust\projects\jogo_adivinha\target\debug\incremental" -L "dependency=E :\OneDrive - Cinel\VStudio\rust\projects\jogo_adivinha\target\debug\deps"
(exit code: 1)
I'm running rustc 1.38.0 and stable-x86_64-pc-windows-msvc ; I have the nightly msvc (and 1.40.0) installed because the tutorial recommended it for the natvis files; the VSCommunity is in English, and the only language pack is English. However, the OS is in Portuguese and localized to Portuguese. The Windows SDK is installed and the Build Tools are installed - if I remove all non ASCII characters from the strings inside my println!(), everything builds.
Inside VS Community, I'm using Daniel Griffen's Rust extension and Whack Whack Terminal to have a shell that allows me to interact with cargo.
I don't need UTF-8 string support to learn Rust, but I'd like to find a way of integrating Rust on my final project (just to show that there is another world outside the MS .NET stack), and if it can't echo proper Portuguese nobody will take it seriously.
Thank you for any help. Regards, tigas.