Fix unicode encoding issue and add better unit test

Some unicode encoding logic from merging with upstream was the issue.

@stvstnfrd 
Why don't we want this any more?

What are the ramifications of removing it 
(besides not running the test ;) )?