Handle value printing where the result contains null characters

e.g.

   snprintf(buf, len, "'%c'", '\0')