So I have string
variable that I want to convert to wstring
.
I'm using mbstowcs_s.
Unfortunately my string
variable contain \0
as a character (does not mark the end of the string) and has documented:
The mbstowcs_s function converts a string of multibyte characters pointed to by mbstr into wide characters stored in the buffer pointed to by wcstr. The conversion will continue for each character until one of these conditions is met: A multibyte null character is encountered
My temporary solution is to convert char by char. that solves the issue but unfortunately deteriorates performance drastically.
Any idea how to overcome that? must I use different function for conversion?