string to char not work