diff --git a/CHANGELOG.md b/CHANGELOG.md index be973aa4..ba868997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ +## v3.11.5 (2023-10-20) + +### Fix + +* Custom input encoding ([#601](https://github.com/CycloneDX/cyclonedx-python/issues/601)) ([`363934c`](https://github.com/CycloneDX/cyclonedx-python/commit/363934c0bc69ebbb23472f1173bf3c6b1e3c023a)) + ## v3.11.4 (2023-10-19) ### Fix diff --git a/cyclonedx_py/client.py b/cyclonedx_py/client.py index 733b08e0..3a348a8e 100644 --- a/cyclonedx_py/client.py +++ b/cyclonedx_py/client.py @@ -199,7 +199,8 @@ def get_arg_parser(*, prog: Optional[str] = None) -> argparse.ArgumentParser: ) input_method_group.add_argument( '-i', '--in-file', action='store', metavar='FILE_PATH', - type=argparse.FileType('r'), # FileType does handle '-' + # custom input shall be treated as binary, the actual encoding is detected later + type=argparse.FileType('rb'), # FileType does handle '-' default=None, help='File to read input from. Use "-" to read from STDIN.', dest='input_source', required=False )