diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-17 18:42:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-17 18:42:52 +0300 |
commit | 95d8d59b4e837afcb5eb8f0e7111139919d2e50c (patch) | |
tree | fd69c28e0fc3d0034be4a7a13bfdd453fe3afaa9 /plugins/New_GPG/src/main.cpp | |
parent | 415be2e734d96a84ecc908879dd6eb333d00d52e (diff) |
NewGPG: fix for hardcoded utf8 constants
Diffstat (limited to 'plugins/New_GPG/src/main.cpp')
-rwxr-xr-x | plugins/New_GPG/src/main.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 5f63adcc85..a1a6436d14 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -308,7 +308,7 @@ void ImportKey(MCONTACT hContact, std::wstring new_key) string::size_type s = output.find("gpg: key ") + mir_strlen("gpg: key "); string::size_type s2 = output.find(":", s); g_plugin.setString(hcnt, "KeyID", output.substr(s, s2 - s).c_str()); - s = output.find("“", s2); + s = output.find(RUS_QUOTE, s2); if (s == string::npos) { s = output.find("\"", s2); s += 1; @@ -318,7 +318,7 @@ void ImportKey(MCONTACT hContact, std::wstring new_key) bool uncommon = false; if ((s2 = output.find("(", s)) == string::npos) { if ((s2 = output.find("<", s)) == string::npos) { - s2 = output.find("”", s); + s2 = output.find(RUS_ANGLE, s); uncommon = true; } } @@ -371,7 +371,7 @@ void ImportKey(MCONTACT hContact, std::wstring new_key) string::size_type s = output.find("gpg: key ") + mir_strlen("gpg: key "); string::size_type s2 = output.find(":", s); g_plugin.setString(metaGetMostOnline(hContact), "KeyID", output.substr(s, s2 - s).c_str()); - s = output.find("“", s2); + s = output.find(RUS_QUOTE, s2); if (s == string::npos) { s = output.find("\"", s2); s += 1; @@ -381,7 +381,7 @@ void ImportKey(MCONTACT hContact, std::wstring new_key) bool uncommon = false; if ((s2 = output.find("(", s)) == string::npos) { if ((s2 = output.find("<", s)) == string::npos) { - s2 = output.find("”", s); + s2 = output.find(RUS_ANGLE, s); uncommon = true; } } @@ -432,17 +432,17 @@ void ImportKey(MCONTACT hContact, std::wstring new_key) string::size_type s = output.find("gpg: key ") + mir_strlen("gpg: key "); string::size_type s2 = output.find(":", s); g_plugin.setString(hContact, "KeyID", output.substr(s, s2 - s).c_str()); - s = output.find("“", s2); + s = output.find(RUS_QUOTE, s2); if (s == string::npos) { s = output.find("\"", s2); s += 1; } - else - s += 3; + else s += 3; + bool uncommon = false; if ((s2 = output.find("(", s)) == string::npos) { if ((s2 = output.find("<", s)) == string::npos) { - s2 = output.find("”", s); + s2 = output.find(RUS_ANGLE, s); uncommon = true; } } |