diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -90,7 +90,8 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM TCHAR cmd[512];
_tcscpy(cmd, _T("--list-secret-keys"));
pxExecute(cmd, "", &out, &code);
- }
+ }
+ cp866_to_cp1251(&out);
while(p != string::npos)
{
if((p = out.find("sec ", p)) == string::npos)
@@ -112,11 +113,11 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM mir_free(tmp);
p = out.find("uid ", p);
p2 = out.find_first_not_of(" ", p+5);
- p = out.find(" ", p2);
+ p = out.find("<", p2);
tmp = mir_a2t(out.substr(p2,p-p2).c_str());
ListView_SetItemText(hwndList, iRow, 2, tmp);
mir_free(tmp);
- p = out.find("<", p) + 1;
+ p++;
p2 = out.find(">", p);
tmp = mir_a2t(out.substr(p,p2-p).c_str());
ListView_SetItemText(hwndList, iRow, 1, tmp);
|