Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45447 )
Change subject: util/rockchip: Port make_idb.py to python3 ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45447/6/util/rockchip/make_idb.py File util/rockchip/make_idb.py:
https://review.coreboot.org/c/coreboot/+/45447/6/util/rockchip/make_idb.py@5... PS6, Line 53: utf-8
I thought that before, but I think as long as the input (e.g. […]
Although in current implementation them seem to always input something you can type (e.g., ASCII), I'd recommend selecting either 'ascii' (and fail if >0x80) or 'latin-1' (which supports raw mapping from 0x00~0xff).
Encoding to utf-8 implies if the user specified something > 0x80, then we won't fail and will be generating unexpected contents (longer than 4).
And an assert may be a better idea especially python3 is handling bytes and string very different.