Fix a bug in the logic for 3-byte encodings of UTF-8.
Authored by: david_costanzo 2019-12-28
Parent: [r5080]
Child: [r5082]