Re: pgagent unicode support

From: Sergey Burladyan <eshkinkot(at)gmail(dot)com>
To: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: pgagent unicode support
Date: 2021-02-24 11:42:27
Message-ID: 87zgztwv30.fsf@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Sergey Burladyan <eshkinkot(at)gmail(dot)com> writes:

> Maybe it should look something like this:
> + wcstombs_s(&charsConverted, mbs, mb_len + 1, wchar_str, mb_len);

Ah, and we missed check for error.

Something like this, maybe:
+#ifdef __WIN32__
+ size_t charsConverted = 0;
+ if (wcstombs_s(&charsConverted, mbs, mb_len + 1, wchar_str, mb_len) != 0) {
+ delete [] mbs;
+ return NULL;
+ }
+#else

--
Sergey Burladyan

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Rahul Shirsat 2021-02-24 11:47:44 Re: [pgAdmin] RM6018 Encoding issue updating database
Previous Message Sergey Burladyan 2021-02-24 11:23:39 Re: pgagent unicode support