utf-8 fixes! Replaced wchar_t with uint16_t. -O2 doesn't increase the binary size that much so let's go for it.