This topic contains 5 replies, has 4 voices, and was last updated by
June 23, 2015 at 1:36 pm #26769ParticipantTopics: 1Replies: 1Points: 0Rank: Member
I write in the script:
$a = read-host "Entre com sua opção:
1)Consultar relatório de servidor
2)Consultar relatório de pensionista
3)Consultar relatório de consignatário"
but the accents don't appear correctly:
Entre com sua opÃ§Ã£o:
1)Consultar relatÃ³rio de servidor
2)Consultar relatÃ³rio de pensionista
3)Consultar relatÃ³rio de consignatÃ¡rio:
what i do?
June 23, 2015 at 1:43 pm #26770KeymasterTopics: 13Replies: 4872Points: 1,811Rank: Community Hero
The PowerShell console app is not Unicode/DBCS compatible. For characters requiring a double-byte character set, there is no workaround other than to not use those characters. The console app isn't actually PowerShell; it's the Windows console host and it's pretty ancient.
July 22, 2015 at 6:56 am #27764ParticipantTopics: 0Replies: 1Points: 1Rank: Member
I'm using Win7 with its PowerShell version 2, it works for me. But I suppose it depends on your Windows' locale encoding. For you, I think "Western European" might work. But try to save your script in UTF-16 BE with BOM. Normally, if you use "Windows PowerShell ISE", it would take care of it.
However, if your Windows' locale is not Western European, I'm afraid that would not work and me too, I'm waiting Microsoft to fix this bug.
Telling people "... to not use those characters" is so dumb! Sorry to say so. Come on, we are in the 2nd decade of the 21st century and Unicode is still not supported? It's like we're using computer in the 80's. That's so archaic!
Not only is it dumb to tell people to not use those characters, it's also a lack of respect to others' culture and language.
Come on Microsoft. Wake up!
July 22, 2015 at 6:59 am #27765KeymasterTopics: 13Replies: 4872Points: 1,811Rank: Community Hero
The console app actually dates from the 1980s, and the PowerShell team doesn't "own" it, so they can't fix it. The fix was the PowerShell ISE, which does support Unicode just fine. Unfortunately, the actual console host has a ton of dependencies on it, so it's not easily fixed without a major effort, which thus far Microsoft hasn't made.
It's nothing to do with a lack of respect on anyone's part. The PowerShell team is well aware of the problem, which is a large part of why the ISE was created.
July 22, 2015 at 7:11 pm #27778ParticipantTopics: 17Replies: 19Points: 1Rank: Member
as far as I understand they made some improvement to the W32Console in Windows 10. don't know if they solved this one.
August 12, 2015 at 11:25 am #28513ParticipantTopics: 1Replies: 1Points: 0Rank: Member
thanks, my friends.
The topic ‘help with encoding’ is closed to new replies.