pgAgent commit: Use std::string instead of std::wstring as it handles t

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: pgadmin-hackers(at)lists(dot)postgresql(dot)org
Subject: pgAgent commit: Use std::string instead of std::wstring as it handles t
Date: 2021-07-14 11:39:57
Message-ID: E1m3dF7-0003xf-0G@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)vashi(at)enterprisedb(dot)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(-)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Yogesh Mahajan 2021-07-14 16:03:25 [pgAdmin][Patch] - Housekeeping #6584 - [React] Port Collation node to react
Previous Message Akshay Joshi 2021-07-14 09:20:38 Re: [pgAdmin][RM6566]: [React] Port Cast node to react.