Fix demo playback not using UTF-8 codec, making it impossible to use for Russian chars and other special chars like emoji etc.
(cherry picked from commit f3e96ca6b38a5e069d98f2db4b17dfb7bb3f239b)
This commit is contained in:
parent
e4483719d4
commit
118ff5c804
@ -254,6 +254,7 @@ void DemoServer::load_demo(QString filename)
|
|||||||
demo_data.clear();
|
demo_data.clear();
|
||||||
p_path = filename;
|
p_path = filename;
|
||||||
QTextStream demo_stream(&demo_file);
|
QTextStream demo_stream(&demo_file);
|
||||||
|
demo_stream.setCodec("UTF-8");
|
||||||
QString line = demo_stream.readLine();
|
QString line = demo_stream.readLine();
|
||||||
while (!line.isNull()) {
|
while (!line.isNull()) {
|
||||||
if (!line.endsWith("%")) {
|
if (!line.endsWith("%")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user