question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Putting 'winget upgrade | Out-String' in a var result with bad character (i'm using french Windows)

See original GitHub issue

Prerequisites

Steps to reproduce

winget upgrade | Out-String

Expected behavior

winget upgrade
Nom                                                          ID                           Version          Disponible   Source
------------------------------------------------------------------------------------------------------------------------------
Stardock Curtains                                            Stardock.Curtains            1.2              1.19.1       winget
Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30501 Microsoft.VC++2013Redist-x64 12.0.30501.0     12.0.40664.0 winget
JetBrains ETW Host Service (x64)                             JetBrains.ReSharper          2022.2.2         2022.2.3     winget
Windows Software Development Kit - Windows 10.0.19041.685    Microsoft.WindowsSDK         < 10.0.22000.832 10.0.22621.1 winget
MSYS2 64bit                                                  msys2.msys2                  20220603         20220904     winget
Windows Software Development Kit - Windows 10.0.17763.132    Microsoft.WindowsSDK         < 10.0.22000.832 10.0.22621.1 winget
MySQL Installer - Community                                  Oracle.MySQL                 1.6.3.0          8.0.30       winget
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30501 Microsoft.VC++2013Redist-x86 12.0.30501.0     12.0.40664.0 winget
8 des mises à niveau sont disponibles.
1 package(s) have version numbers that cannot be determined. Use "--include-unknown" to see all results.

Actual behavior

Nom                                                   ID                           Version          Disponible   Source
-----------------------------------------------------------------------------------------------------------------------
Stardock Curtains                                     Stardock.Curtains            1.2              1.19.1       winget
Microsoft Visual C++ 2013 Redistributable (x64) - 12 Microsoft.VC++2013Redist-x64 12.0.30501.0     12.0.40664.0 winget
JetBrains ETW Host Service (x64)                      JetBrains.ReSharper          2022.2.2         2022.2.3     winget
Windows Software Development Kit - Windows 10.0.1904 Microsoft.WindowsSDK         < 10.0.22000.832 10.0.22621.1 winget
MSYS2 64bit                                           msys2.msys2                  20220603         20220904     winget
Windows Software Development Kit - Windows 10.0.1776 Microsoft.WindowsSDK         < 10.0.22000.832 10.0.22621.1 winget
MySQL Installer - Community                           Oracle.MySQL                 1.6.3.0          8.0.30       winget
Microsoft Visual C++ 2013 Redistributable (x86) - 12 Microsoft.VC++2013Redist-x86 12.0.30501.0     12.0.40664.0 winget
8 des mises à niveau sont disponibles.
1 package(s) have version numbers that cannot be determined. Use "--include-unknown" to see all results.

Error details

By exemple check the line about 'Microsoft Visual C++ 2013 Redistributable (x64)'
Expected 
Windows Software Development Kit - Windows 10.0.17763.132    Microsoft.WindowsSDK         < 10.0.22000.832 10.0.22621.1 winget
But currently i got 
Windows Software Development Kit - Windows 10.0.1904 Microsoft.WindowsSDK         < 10.0.22000.832 10.0.22621.1 winget

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.0-preview.8
PSEdition                      Core
GitCommitId                    7.3.0-preview.8
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
jborean93commented, Sep 28, 2022

There’s https://github.com/PowerShell/PowerShell/issues/14945 which I’ve opened before about $OutputEncoding and [Console]::InputEncoding not lining up (they should). It would be nice if [Console]::OutputEncoding also lined up but it’s somewhat less of an issue as most console apps respect the console output codepage that pwsh will use to decode the bytes it receives.

1reaction
jhoneillcommented, Sep 28, 2022

@jborean93 Thanks for the explanation. I’m not sure if I was misremembering or misunderstanding, but I appreciate the clarification

Read more comments on GitHub >

github_iconTop Results From Across the Web

PowerShell encoding issue when storing cmdlet response ...
I'm curious to see what you come up with. For the rest of us, here is a little code that will turn the...
Read more >
upgrade command (winget)
This is most often the string of characters you expect to help find the package you are upgrading. Options. The options allow you...
Read more >
Why isn't everyone using WinGet? : r/Windows10
149 votes, 110 comments. I switched to using Chocolatey a few months and really love being able to install and update applications as...
Read more >
Winget not working
But today, I am trying to run `winget` in the same way I ran it two days ago and now it is not...
Read more >
Winget: The best way to keep Windows apps updated
Winget is designed to enable “users to discover, install, upgrade, remove and configure applications on Windows 10 and 11 computers,” according ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found