modified encode from GBK to utf-8, windows to unix.