Robustly read remaining bytes in a character

Closes #11372
auto merge of #11375 : alexcrichton/rust/issue-11372, r=pcwalton

Closes #11372