Previously an exception was thrown since Win32 WideCharToMultiByte API returns error on zero-length input.