fix int to char conversion

 - the test for ConvertHtmlCodes was only testing what goes in comes
   out which was working correctly, however the conversion of int to
   char values was not happening correctly.  I added a new test with a
   real example and fixed the int to char conversion.
Merge pull request #854 from NickLarsen/v3-fixes

fix int to char conversion
Merge branch 'v3-fixes' into v3