Character encoding auto-detection in Python