I have the following code:
bool IsCharVowel(const wstring uChar)
{
if (Has(L"aeiouäöüúéáàèùò",uChar))
{
return true;
}
else
{
return false;
}
}
bool Has(wstring uSearchIn, wstring uSearchFor)
{
if (uSearchFor.size()==0)
{
return false;
}
if (uSearchIn.find(uSearchFor)!=wstring::npos)
return true;
else
return false;
}
As soon as I inspect the passed wstring in the function "Has", the wstring is different from what I have entered:
uSearchIn = L"aeiouäöüúéáà èùò"
Does anybody see what is going wrong here?
I got it!!
I changed the encoding of the .cpp file to "UTF-8 (no signature)"
I have now switched it to "UTF-8 (with signature)".
Now it works as expected.