[common] fix utf-16 issue under win32
Merge pull request #742 from Chilledheart/patch-1

[common] fix utf-16 issue under win32