Re: Copy to clipboard from ctlSQLBox on windows has line ends broken. - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Copy to clipboard from ctlSQLBox on windows has line ends broken.
Date
Msg-id CA+OCxoxN5Eb8+x1QaARyyESZRs+pv4Wt0AsA4s+Sn2a9eD5uoA@mail.gmail.com
Whole thread Raw
In response to Re: Copy to clipboard from ctlSQLBox on windows has line ends broken.  (Nikolai Zhubr <n-a-zhubr@yandex.ru>)
List pgadmin-hackers
On Tue, Oct 6, 2015 at 11:23 PM, Nikolai Zhubr <n-a-zhubr@yandex.ru> wrote:
> Hi all,
>
> As I've now found, a lot of pgXXX::GetSql() functions autogenerate sql code
> using hardcoded LF line ends ('\n\n'), and this has been so for ages,
> therefore probably it is OK.
>
> But, in order for 'copy to clipboard' to work well (also on ms windows),
> these LF line ends have to be somehow "compensated". Generally, it could
> possibly be arranged in two places:
>
> -- convert to the system line ending before passing it _to_ ctlSQLBox;
> -- or convert just before copying to clipboard _from_ ctlSQLBox.
>
> I'm not quite sure how it was initially supposed to work, but it did work
> correctly on windows previously. Right now though I can not see any such
> automatic conversions anywhere. Sure I could add some, but I'd like to
> understand the whole picture first...

Yeah, I don't think any of that code has changed in many years. Any
chance you can try it with an older version of wxWidgets to rule that
out?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgadmin-hackers by date:

Previous
From: Nikolai Zhubr
Date:
Subject: [PATCH] Perform conversion to platform line-ends when copying to clipboard (Was: Copy to clipboard from ctlSQLBox on windows has line ends broken)
Next
From: Dave Page
Date:
Subject: pgAdmin III commit: Ensure the correct line endings are used when copyi