Refactored charset encoding unit tests

Found a bug in the test-yahoo-jp.dat file and fixed it.
There are definitely bugs in attribute value parsing today on corner
cases.