encodings.py: put all imports on top level

get_encodings(): renamed, so as not to clash with imported module encodings