I notice that the string method 'lower' seems to convert some strings (input from a text file) to Unicode but not others. This messes up sorting if it is used on arguments of 'sorted' since Unicode strings come before ordinary ones.

Is there a better way of case-insensitive sorting of strings in a list? Is it necessary to convert strings read from a plaintext file
to Unicode? If so, how? This is Python 2.7.8.

Regards

John Sampson
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to