Specify encoding explicitly

Specify encoding explicitly so that sort.py will work with different
system encodings.