mover charset_map from wireprotocol.py to consts.py
str_to_bytes() return as is at Python2
add error.args
python2's unicode