In QML I have a TextArea. When I set the text property of this TextArea to "ÆØÅ" it shows "ÆØÅ" when the program runs.
I also get text through some functions that I want to show in the same TextArea, but then "ÆØÅ" is shown as "???".
The strings come from this C++ function:
QString Tts::morseToChar(QString morse)
{
if(morse == ".-") return "A";
else if (morse == "-...") return "B";
...
...
else if (morse == ".-.-") return "Æ";
else if (morse == "---.") return "Ø";
else if (morse == ".--.-") return "Å";
}
The return string gets added to a QML string:
property string ttsChar: ""
ttsChar += ttsSpeak.morseToChar(morse)
_ttsTextArea.text += ttsChar
All files are saved as UTF-8.
What conversion am I missing to get this to work?