delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/06/25/14:54:53

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82F6E385740B
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=B4F8bMhM c=1 sm=1 tr=0 ts=60d62669
a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
a=IkcTkHD0fZMA:10 a=CCpqsmhAAAAA:8 a=94nOnFI1EgyDtX4ev68A:9 a=QEXdDO2ut3YA:10
a=oq2aNKfg7m0A:10 a=ul9cdbp4aOFLsgKbc677:22
Subject: Re: getclip and putclip garble unicode characters
To: cygwin AT cygwin DOT com
References: <af6d2888db8e4256b8c24064389aed9b AT severstal DOT com>
<1442655532 DOT 20210624093554 AT yandex DOT ru>
<29705e0f-f6b4-eca8-f350-b4100d2c7244 AT towo DOT net>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
Message-ID: <2b37488d-83be-898f-15df-bc6f3bc0fa52@SystematicSw.ab.ca>
Date: Fri, 25 Jun 2021 12:54:32 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <29705e0f-f6b4-eca8-f350-b4100d2c7244@towo.net>
X-CMAE-Envelope: MS4xfOALiskgNJj5RMcBRrRypvy+2iO6d4OZ3ZEkkS8HF7oeHaMEaB3sA+XVTqMQZoEHXyPwEEeF8Hxrdxh/l7BvugwT99lqUfqvBuQQvhMKb2psGBSevGor
hzebColznr1rsmYM3l/9ap2cV93ZPqPJoslBBfuNo0NjTh5AJ5c70yi0E4yleLlYxhQOrs7nvQBOFfZ2h8AcoMCE+wli0kD6Z5k=
X-Spam-Status: No, score=-1159.7 required=5.0 tests=BAYES_00, BODY_8BITS,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A,
RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 15PIsrS1010510

On 2021-06-25 12:01, Thomas Wolff wrote:
> Am 24.06.2021 um 08:35 schrieb Andrey Repin via Cygwin:
>> Greetings, Миронов Леонид Владимирович!
>>> getclip and putclip from cygutils-extra garble unicode characters:
>>> non-latin characters copied to clipboard in windows are replaced with
>>> question marks when retrieved with getclip in cygwin, and non-latin
>>> characters copied to clipboard using putclip are pasted it in windows
>>> looking like utf-8 displayed in cp1252 but can be retrieved with getclip
>>> exactly as pasted, so it looks like the problem is not in the way the 
>>> data
>>> is copied but in the way cygwin and windows communicate text encoding to
>>> each other. LC_CTYPE=en_US.UTF-8, windows ANSI codepage is set to 
>>> cp1251 - 1251, not 1252.
>> This looks like you are using a program incapable of dealing with unicode
>> clipboard. To achieve better results, switch your input 
>> language/keyboard to
>> matching language before copying text from application. I.e. switch to
>> Russian then copy text, then check what is returned by getclip.
>> But then, why LC_CTYPE is en_US?
> getclip and putclip are just broken, they don't even work in a pure 
> UTF-8 environment.
> Already noticed 9 years ago... 
> https://sourceware.org/legacy-ml/cygwin/2012-03/msg00648.html
> including a script-based replacement.

Just cat [<>] /dev/clipboard: recent Windows changes may have affected 
Windows<->X copy and paste transparency.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019