Somewhere in the layers of functions we're accidently casting unsigned character values as signed, and they are getting sign extended, causing blinking and bold text. This patch makes sure we only use the 8 bits we support right now.
This is probably not wchar safe, as the comment says.