-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Describe the bug
When the stdout of a program is in UTF-16, the app handler interprets the string as UTF-8 but with null characters (\x00) between each character.
This makes writing regex patterns for the regex handlers difficult because you need to account for all the null characters.
Expected Behaviour
UTF-16 strings should be properly parsed so there are no null characters
Current Behaviour
The app handler puts \x00 between each character
Reproduction Steps
The 3ds Max Adaptor (https://github.com/aws-deadline/deadline-cloud-for-3ds-max) can be modified to use 3dsmaxbatch by changing the call command in adaptor.py to this:
args=["3dsmaxbatch", "-dm", "on", "-v", "5", self.max_client_path],
After doing so, all the regex patterns used by the regex handlers will fail because they don't account for null characters. Regex patterns can be found here: https://github.com/aws-deadline/deadline-cloud-for-3ds-max/blob/59d1716000dda7fbf41a3b81888ded550f04a780/src/deadline/max_adaptor/MaxAdaptor/adaptor.py#L173-L175
Environment
At minimum:
- Operating system: Windows Server 2025
- Output of
python3 --version: 3.10 - Version of this library. 0.8.1
Please share other details about your environment that you think might be relevant to reproducing the bug.
I first encountered the bug while trying to build a 3ds max batch CMF worker