add string convert function

fix main.c coding as Gb2312