fix repr of strings/chars with quotes

Closes #8743