Replaced codecvt with Win32 API.
Removed useless strlen() and wcslen().
Unified the same debug messages.
Merge pull request #420 from TsudaKageyu/remove-codecvt

Replaced codecvt with Win32 API.