Add failing unit test for charset in constructor.
Fix trivial bug with charset in constructor.