mattdrayer/ascii-exception-fix: Support unicode characters

@antoviaque --- here is the corresponding fix to Braden's upstream change for the "ascii codec" unit test failures.