adding a clientside example for html output.
fixing string length change when converting to graphic characters.