use matching char types for strings (issue #5106)