From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by sourceware.org (Postfix) with ESMTPS id 12CA9385703A for ; Fri, 25 Jun 2021 18:01:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 12CA9385703A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=towo.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo.net Received: from [192.168.178.72] ([91.65.247.112]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N0FE1-1l0Shl2GqF-00xIMN for ; Fri, 25 Jun 2021 20:01:50 +0200 Subject: Re: getclip and putclip garble unicode characters To: cygwin@cygwin.com References: <1442655532.20210624093554@yandex.ru> From: Thomas Wolff Message-ID: <29705e0f-f6b4-eca8-f350-b4100d2c7244@towo.net> Date: Fri, 25 Jun 2021 20:01:58 +0200 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: <1442655532.20210624093554@yandex.ru> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:wxVAO++k/lVqD5+UrcMPr+O8mDeKxD5r7HrlCAoPhwQZ4bzY9HH +AJd6boFdMMKtvuhQIs3L9m6avPsvagE5zIO+xAg8OJeYiP88OgCIEjgwxyNQxfOEqCutOL GrYgU7SnF6bBQXEn6swvWP/nB0fW0xwkAR4xQhmj7Td1sc/kqKeBzOfLZ3xMXe+lky0uN6S gTd5Ozxwrc1bjKSSiSTfw== X-UI-Out-Filterresults: notjunk:1;V03:K0:oJmJzuOchOk=:BR/EVg+/GAOEVgNUXVnchF OTKA7XIhUnaFoBe3bk4frlDsZesFsIa1S+kqyN1O16KOqzgAbSOjq/wKvWbj7WFf0P2cQA7i0 Rb9uPALArT4GYO3dVoeQVav8t99Kn0bFZHz/Gx/IfXzZzN7zh8+HYVe9j1gNLkD6GW4N3G0rn 8dEwcLvf2OPhcBLajrHXTJ9vKtY3IHBnOqgDxYT0hwIGgips5s4xGxiDBDM6DZMoynHNJQ0Sh iU+NDU/8uGe8N0EGmlVIJFoCUODcIt0u8UufKA5x3ypb86kiyccMLKB50lonA2ZsL8/E+wt5c FvHQ26rEjFYjdUnbQdX8EtYwFlagVRq6P5eLBFleB4j+Jscrqh5kysEVa1g8S8WOvw51zmGIV tZOf2xm4uHLAcxPnhik7N+hK30wTMyK7m6KHBRF++MGIWtuL94KruBluYFlEs5Gho0HmGfFgy dJFkG/oaAb24QxJxObnMpkA//41WrorK4RnTvOMvYW4zUwjgZy8LChKX90t/mrxa9vNC2m+vH ZdIWigMik8CZax0pwe477M= X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2021 18:01:54 -0000 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. Thomas