Azure / Azure/azure-devops-cli-extension
az repos pr list : invalid json output produced when non-usual unicode characters are present in title or description
- Dominant language
- Python
- Stars
- 682
- Forks
- 278
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 3
Description
### **This is autogenerated. Please review and update as needed.**
## Describe the bug
**Command Name**
`az repos pr list
Extension Name: azure-devops. Version: 0.25.0.`
**Errors:**
If the Pull request's Title or Description (and possibly other elements) contain non-ascii characters (in this case unicode 0x96) , these are outputted 'as-is', instead of being properly serialized into two bytes.
Because of that the file fails to conform to standard, and is therefore invalid.
## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- _Put any pre-requisite steps here..._
Enter a Pull request with title containing long dash "–"(character 0x96).
- `az repos pr list --organization {} --project {} --repository {} --status {} > file.json`
execute the above from cmd.exe, not powershell.
## Expected Behavior
The produced json file should encode the 0x96 character in UTF8 as two bytes: 0xC2 0x96 .
## Environment Summary
```
Windows-10-10.0.19044-SP0
Python 3.10.5
Installer: MSI
azure-cli 2.41.0
Extensions:
azure-devops 0.25.0
Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.