Merge pull request #5474 from UtahDave/develop

Fix function typo
use locale.get_encoding
add newline for clarity