io: Improve handling of invalid unicode codepoints
Applications running in FVPs/on boards may send garbage
data to serial. Python's bytes.decode/str.encode methods
default to strict encoding/decoding which raises exceptions
when bytes produce an invalid codepoint.
This commit changes:
* FvpController._spawn - to use 'replace' i.e. substitute the
unicode replacement character for any invalid codepoint
* TestDevice.communicate - to allow the caller to set the
error handling method, keeping 'strict' as the default
Signed-off-by:
Chris Swinchatt <christopher.swinchatt@arm.com>
parent
db3e1ddc
Loading
Loading
Pipeline
#4146
passed
with stages
in
1 minute and 27 seconds
Loading
Please register or sign in to comment