change structure, solve encoding problem on mbcs