Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
617 stars 239 forks source link

No way to change the encoding of the output #983

Open DJackman123 opened 4 years ago

DJackman123 commented 4 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Somewhere between Azure CLI 2.1.0 and 2.3.0 a new warning message started showing up when executing some commands in the azure-devops extension: Unable to encode the output with cp1252 encoding. Unsupported characters are discarded.

This makes sense, there's probably a special character in one of the names that doesn't work in the cp12152 encoding. But there's no way to specify a different encoding to use (like UTF-8) that would allow me to get the full information in the output without discarding characters.

Command Name az repos list Extension Name: azure-devops. Version: 0.17.0.

Errors:

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

The behavior I'd like to see is my being able to add another parameter to the command line (like --encoding utf-8) that will change the encoding of the output so the warning message does not get displayed and the output does not have any discarded characters.

Environment Summary

Windows-10-10.0.19041-SP0
Python 3.6.6
Installer: MSI

azure-cli 2.3.0 *

Extensions:
azure-devops 0.17.0

Additional Context

Blankf commented 4 years ago

having the same experience on my azure devops hosts, did you find any solution yet.

DJackman123 commented 4 years ago

No solution to avoid the error completely. Only a trick to avoid having the error message mess with the console color.

LockTar commented 2 years ago

This would be very handy to have. I saw a similar issue #581 were encoding was added. I have the warning when I'm exporting all the users of Azure DevOps.

FranLegon commented 2 months ago

Same problem. "á" is replaced for "ß", "ó" for "≤", etc.