- Home /
Display a python output with special characters in GUI label unity
Am running a python script from unity, and I want the output to be displayed in a GUI label in unity, the output contain special characters like é,ç,... but am getting symbols instead. This is what I tried so far but no luck
using (Process proc = Process.Start (start)) {
using (StreamReader reader = proc.StandardOutput) {
string result = reader.ReadToEnd ();
UTF8Encoding utf8 = new UTF8Encoding ();
byte[] encodedBytes = utf8.GetBytes (result);
UnityEngine.Debug.Log (result);
Message1.text = result;
}
}
result is the output: it should be
('fromaje', 'Fausse:')
('Correction suggérér:','fromage')
But the result is diffrent, it is in the image below
capture.png
(7.6 kB)
Comment