Avoid passing negative values (i.e. signed characters) to isprint() which is not happy with doing this on some platforms.