Revert from wstring (need to work out how to properly support unicode)