Convert between wstring and string.