pgAgent commit: Use std::string instead of std::wstring as it handles t - Mailing list pgadmin-hackers

From Ashesh Vashi
Subject pgAgent commit: Use std::string instead of std::wstring as it handles t
Date
Msg-id E1m3dF7-0003xf-0G@gothos.postgresql.org
Whole thread Raw
List pgadmin-hackers
Use std::string instead of std::wstring as it handles the utf-8 'conversation
from char*' well, and also - it was not needed to convert to std::wstring, as
we needed to convert it again as 'char *', while doing the database operation.
This unnecessary conversation of 'char* to std::wstring was resulting into
garbage characters, as not all characterset works great with UTF-8.

This change will handle both encoding/decoding of the characterset a lot better
with lesser memory & cpu requirement (as we're avoiding conversation most of
the places.

Reviewed by: Neel Patel

Neel has also fixed an issue regarding the compilation of code on Windows.

Fixes #6238

Signed-off-by: Ashesh Vashi <ashesh.vashi@enterprisedb.com>

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgagent.git;a=commitdiff;h=f8bb3f494f65eaa43b5bb698587c261631f28394

Modified Files
--------------
CMakeLists.txt          |   4 +-
connection.cpp          | 317 +++++++++++++++++++++++-------------------------
include/connection.h    |  84 ++++++-------
include/job.h           |  14 +--
include/misc.h          |  21 ++--
include/pgAgent.h       |  16 +--
job.cpp                 | 278 +++++++++++++++++++++++-------------------
misc.cpp                | 220 ++++++++++++++-------------------
pgAgent.cpp             | 186 +++++++++++++++-------------
pgAgent.rc              |  12 +-
pgaevent/pgamsgevent.rc |  10 +-
unix.cpp                |  67 ++++------
win32.cpp               |  80 ++++++------
13 files changed, 644 insertions(+), 665 deletions(-)


pgadmin-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: [pgAdmin][RM6566]: [React] Port Cast node to react.
Next
From: Yogesh Mahajan
Date:
Subject: [pgAdmin][Patch] - Housekeeping #6584 - [React] Port Collation node to react