fix compilation error, fix charset