Re: pgagent unicode support

From: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
To: Sergey Burladyan <eshkinkot(at)gmail(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 12:23:08
Message-ID: CACCA4P0CnEe1+_yq4brdNKFHuL+HP0em+S2tfbLWcnEDPFNbfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Sergey,

Thanks for the review. Please find the attached updated patch.
Do review it and let me know in case of any comments.

Thanks,
Neel Patel

On Wed, Feb 24, 2021 at 5:12 PM Sergey Burladyan <eshkinkot(at)gmail(dot)com>
wrote:

> 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
>

Attachment Content-Type Size
pgagent_unicode_v2.patch application/octet-stream 2.1 KB

In response to

Responses

Browse pgadmin-hackers by date

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