s1689: more robust quoting for strange characters