unify charset.py packet.py