c++ can't convert string to wstring
问题 I would like to convert a string variable to wstring due to some german characters that cause problem when doing a substr over the variable. The start position is falsified when any these special characters is present before it. (For instance: for "ä" size() returns 2 instead of 1) I know that the following conversion works: wstring ws = L"ä"; Since, I am trying to convert a variable, I would like to know if there is an alternative way for it such as wstring wstr = L"%s"+str //this is