Skip to content
Snippets Groups Projects
Commit efad3d4e authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

vcard: use UTF-8 codec when receiving contact profile

Gitlab: #450
Change-Id: I2e9bd8dbf08f8bc1e7a01e9d16795381f58f054f
parent 032f1dba
No related branches found
No related tags found
No related merge requests found
...@@ -1161,6 +1161,8 @@ ContactModelPimpl::slotProfileReceived(const QString& accountId, ...@@ -1161,6 +1161,8 @@ ContactModelPimpl::slotProfileReceived(const QString& accountId,
if (!vCardFile.open(QIODevice::ReadOnly | QIODevice::Text)) if (!vCardFile.open(QIODevice::ReadOnly | QIODevice::Text))
return; return;
QTextStream in(&vCardFile); QTextStream in(&vCardFile);
in.setCodec("UTF-8");
auto vCard = in.readAll(); auto vCard = in.readAll();
vCardFile.remove(); vCardFile.remove();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment