Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjjdD-0001Zi-0T for pgadmin-hackers@arkaria.postgresql.org; Wed, 07 Oct 2015 07:59:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZjjdC-0002WY-I8 for pgadmin-hackers@arkaria.postgresql.org; Wed, 07 Oct 2015 07:59:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZjjdB-0002WP-3D for pgadmin-hackers@postgresql.org; Wed, 07 Oct 2015 07:59:21 +0000 Received: from mail-ig0-f169.google.com ([209.85.213.169]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zjjd3-0002YX-0Y for pgadmin-hackers@postgresql.org; Wed, 07 Oct 2015 07:59:19 +0000 Received: by igcrk20 with SMTP id rk20so103321523igc.1 for ; Wed, 07 Oct 2015 00:59:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FXXA2ZtC1T/HMcKrsVGRl+fdj2sLMWcZlVkJUu01AFU=; b=Vn8I84iaM1e0zEUUoCu4wUlExJklF8pnM6Q8Dv1x0lQoCuWAm69UrBtaunsLkDesHb +NI7HiTSKCbU5s/vbY1ETTix/8/23VAAV+odTmBP+0FuY7fsiqVL9qsnsY6wFPGynKsH M3usG2CsigrQHuI0mvYBKhkATfvdpsex/3CFaVZWc5LaZVq0cS0FMRaG9L/+PviSsMYA Ua+iQrQT/XVuO2ZdDV57KjsX+Llxfg+5hcgWuyqd9OMuwBdd2Tfj+6kzrYIlzPPogKW4 9TNyxvjPdwTbQMRcFzEQCTh+K7hBjKvyq+8GRo3pZtGCDYkB7s0YtwUJKZhKfaWPNdi3 wG0Q== X-Gm-Message-State: ALoCoQnjAIB8mk4iBTWd0QO6Pu3JslVcIl3ZtLPiwRjx2KOXNebWKH+X7TelVsSyPKnB2UhMVO+1 MIME-Version: 1.0 X-Received: by 10.50.55.3 with SMTP id n3mr21736863igp.11.1444204751793; Wed, 07 Oct 2015 00:59:11 -0700 (PDT) Received: by 10.64.110.37 with HTTP; Wed, 7 Oct 2015 00:59:11 -0700 (PDT) In-Reply-To: <561449E1.6050100@yandex.ru> References: <5613D05E.1050702@yandex.ru> <561449E1.6050100@yandex.ru> Date: Wed, 7 Oct 2015 08:59:11 +0100 Message-ID: Subject: Re: Copy to clipboard from ctlSQLBox on windows has line ends broken. From: Dave Page To: Nikolai Zhubr Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org On Tue, Oct 6, 2015 at 11:23 PM, Nikolai Zhubr 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 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers