fix for non-ansi chars

First, thanks for creating the binding !

I think my changes are pretty straightforward, try them on a windows build if you want to be sure.

Also, I've seen no more UTF-32 locales than SHA-1 collisions in my life, did you ?