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.