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 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 Subject: Re: getclip and putclip garble unicode characters To: cygwin AT cygwin DOT com References: <1442655532 DOT 20210624093554 AT yandex DOT 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> 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 AT cygwin DOT 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: , Content-Type: text/plain; charset="cp1251"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 15PI2CQe002672 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 -- 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