When I use Write-Host
in my PowerShell script, the output looks like this: ????? ?????.
This happens because I'm entering strings in Arabic with Write-Host
, and it seems that PowerShell doesn't support Arabic...
How do I print text using Write-Host
, but in unicode UTF-8
(which supports Arabic).
Example: Write-Host "مرحباً بالعالم"
The output in this case will be: ????? ?????
Any solutions?
CodePudding user response:
Fixed
You need to set a font that supports those characters. Like
Before
I didn't actually need wt
here, I'd suggest it. windowsterminal is a modern term, which is now an inbox
app. Meaning it's default on windows going forward.
There's utf8
that doesn't work on the term, that wt
supports (both using the cascadia code pl
font