Check encoding for all params during normalization (Issue #168)

Round 2. Cleaned up the commit history and tested on Python3 and Python2.7 via the run-tests.sh script and both passed successfully.