def single_byte_full_encoding(encoding):
if PY3:<EOL><INDENT>bytes_ = map(lambda i: bytes([i]), range(<NUM_LIT:0>, <NUM_LIT>))<EOL><DEDENT>else:<EOL><INDENT>bytes_ = map(chr, range(<NUM_LIT:0>, <NUM_LIT>))<EOL><DEDENT>for byte in bytes_:<EOL><INDENT>try:<EOL><INDENT>byte.decode(encoding)<EOL><DEDENT>except UnicodeDecodeError:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Whether the encoding can decode all byte values (e.g. latin1)