Convert QString to Local8bit and then convert string to QString

How can I convert this to local8bit and then convert the string to QString:

QString m = QString::FromStdString("Ú©Ù?Ù?ات Ù?رتبط(0):<BR> <BR><HR><BR><BR><A href='bword://0'>بازگشت بÙ? Ù?اÚ?Ù? 0</A></B><BR><BR><HR><BR><A href='bword://latitude (l,0)'>latitude (l,0)</A> <BR> <B><A href='bword://logical 0 state'>logical 0 state</A> </B><BR><BR><HR> 0 ");code here 
+1
source share
1 answer

If I understand correctly, you are looking for the following functions:

 std::string str = m.toLocal8Bit().data(); 

and vice versa

 QString m = QString::fromLocal8Bit("SomeText in Local"); 
+2
source

Source: https://habr.com/ru/post/974818/


All Articles