From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id IKkEI6RhE2eVeAAAe85BDQ:P1 (envelope-from ) for ; Sat, 19 Oct 2024 07:37:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id IKkEI6RhE2eVeAAAe85BDQ (envelope-from ) for ; Sat, 19 Oct 2024 09:37:08 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZkWVD6Os; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729323428; a=rsa-sha256; cv=none; b=rVCeFqmARCqAf7q4jFk1h/Er8Z1e1r1ya6NouGkWgPs2IIZKXVevlx1IEsRMqKTtAZBF9E gX6LRw6cKdcGBZVc059brH4hG5qJtMES4iXgBgOKKMpTPqYOZt+cbuq4bzVlchE1qJ/dv8 sCh09hueEqu5i255d/RDC5ypNhK5Wtndi6j1PEyUr80GJLQZJEn/Pnk5ehwFEZX2az0QhZ bNBBMCeRVOHwbpl85ScalebyRhCH+bTnPHafUyWgdwtwXLbKsvs6HsTE/j/uWfw5RZyR43 b5TSi+OvdvXIhJrOaoKFdVVo6JTM1/ojnE9OCAkBCe/2VNP6G0EzjcPDh4gZCg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZkWVD6Os; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729323428; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=YbY2Lzj83SzVQzsgtIb5TKok7L29Ay0jJlCnMDV1Wwo=; b=sC5mdb6Smbeyx2eWgHnX5iBGSOmBh4oLC1eygWn35IRL9FwN1X52PL6fZXoSQrFJ2ZD89H XcNYpsTuRaaOTslGWTCHfrvITvouYdgUgGH+0lctiwjAnDqkYCsXiIbavJKWrnyCkfiJQc +0ZkrzOBoLFdih75nVpTPnbX9ccLwydlfl+Aey21oEshthF/PICwNecj6huix8UIXgiM9/ SP13G2/39YpZPZms5ZF+PP0BIaHJf/k4xFZRm6qInJWnIS0QxFl2dxLir7MTe0uzL6ocZ0 EQChOtB6x9nkM//SlTMd79aw9HKdEhJrBTk2rHb8soPXXD2h1FRLCN+SIN1goA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6EDB77AAA6 for ; Sat, 19 Oct 2024 09:37:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t240X-0001OH-5A; Sat, 19 Oct 2024 03:36:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t240O-0001Ne-R7 for emacs-orgmode@gnu.org; Sat, 19 Oct 2024 03:36:08 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t240J-0005bg-8K for emacs-orgmode@gnu.org; Sat, 19 Oct 2024 03:36:08 -0400 Received: by mail-pf1-x444.google.com with SMTP id d2e1a72fcca58-71e580256c2so2150962b3a.3 for ; Sat, 19 Oct 2024 00:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729323360; x=1729928160; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YbY2Lzj83SzVQzsgtIb5TKok7L29Ay0jJlCnMDV1Wwo=; b=ZkWVD6OsfBIs/xsAxVKAowi5jd7zuR8sR9gUdgF3aqYSW8MzLrWrHrfNHMox7EJN1i LD5/gxfi3DoHe0FEg3inBIIwY47v0CJMZPapMWaCBeICL6s2D6zN34VZxD8IUUHhSHIV MwHh/MaRCotbS+xS1zzdonDYr3Lni0zcIIk4dlVOoTneN3sKg/CnLCk3ND3q4vtALAf7 SjwDXA+XsRFNC9KA4P2+xcxKuvI9alhSmb0TrlXU12BMYsyn7O2F96EAlvKjoI0MAutw kHu9X0xeJK4J5aLZjY61ZzFkLo/JE7moCPXhLMxww/lxmTnMBgc/cIjPzG2u1hSFkPf4 3bEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729323360; x=1729928160; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YbY2Lzj83SzVQzsgtIb5TKok7L29Ay0jJlCnMDV1Wwo=; b=L9Bt8oi/QwxhGgX/L+KXGTiFdLdEbQtH31U10WSXeoCfAeezZAFKZ/mXRgvTjPGHA6 sLzruXRX/gPsd0Ze0A1U+bljYHYci9CzjrggexWarjrbMlw5fLwqQvB5LwJawnk/KRN5 +f21zajt06nmseV5ruxanp6P6ZTucND8UWlpzAV53C46rSBphW3cEYHGdLrHdD+Pifss Y6tEqIg2Pdy/UexNA1g4ckxGSty8VotN6dWDpwj9BgL3sYt7r2PG1aTUM0fujDITtmk2 z0Nd2TBh/X4FbYg9U7HVafcwLaALdJkKVqi8nsi43jNhJWbJHsAib1t8/4mziY3wBGg9 pIkQ== X-Gm-Message-State: AOJu0YxO9jWaQnUSwz98mt+mzeuLX3ZrfKDFxSx3Bi2nD4vrgWKNiM3f IMnJ62LgX7VeyfCT60OrAMoY1qKrTjbGElKvJuO+PbxJ8Enq+spB1HmYdZMO X-Google-Smtp-Source: AGHT+IFnl6Hp2hXF8/QrrqrU3I/vmONtYtVskwaI/yGCELw6ZO4wG39PBI8ELunCu2o1+GiOVRR90w== X-Received: by 2002:a05:6a21:3a94:b0:1d9:ea5:19da with SMTP id adf61e73a8af0-1d92c4e15e0mr7072021637.17.1729323360518; Sat, 19 Oct 2024 00:36:00 -0700 (PDT) Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ea317854dsm2582797b3a.0.2024.10.19.00.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2024 00:36:00 -0700 (PDT) From: Visuwesh To: Ihor Radchenko Cc: org-mode-email Subject: Re: [PATCH] Add yank-media handler for LibreOffice Calc tables In-Reply-To: <871q0cy3h2.fsf@localhost> (Ihor Radchenko's message of "Sat, 19 Oct 2024 07:08:25 +0000") References: <87r08i3alo.fsf@gmail.com> <871q0ise9x.fsf@localhost> <87msj53o2o.fsf@gmail.com> <87msj5dx8l.fsf@localhost> <87ttdawssj.fsf@gmail.com> <871q0cy3h2.fsf@localhost> Date: Sat, 19 Oct 2024 13:05:56 +0530 Message-ID: <87ed4cwnmr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x444.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.63 X-Spam-Score: -4.63 X-Migadu-Queue-Id: 6EDB77AAA6 X-Migadu-Scanner: mx10.migadu.com X-TUID: gs+qHoMx/mjw [=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=85=E0=AE=95=E0=AF=8D=E0=AE=9F=E0=AF=8B= =E0=AE=AA=E0=AE=B0=E0=AF=8D 19, 2024] Ihor Radchenko wrote: > Visuwesh writes: > >>> Here is the recipe >>> 1. make repro (I tried with the latest Emacs master and with Emacs 29) >>> 2. Open test.odt (attached) >>> 3. M-x org-mode >>> 4. Copy the non-empty cell area >>> 5. M-x yank-media app >>> 6. Observe encoding problems >> >> Thanks for the reproducer. I think this might be locale-dependent. I >> fail to reproduce on my end with the following locale settings: >> >> LANG=3Den_GB.UTF-8 >> LC_COLLAGE=3Dta_IN.UTF-8 >> LC_MONETARY=3Dta_IN.UTF-8 >> LC_NUMERIC=3Dta_IN.UTF-8 >> >> locale-coding-system =3D 'utf-8-unix >> >> I have no idea how to deal with locale issues like this unfortunately. > > I tested a bit further, and it might not be locale. Maybe it is some > LibreOffice version issue or build issue. My LibreOffice version is % libreoffice --version LibreOffice 24.2.5.2 420(Build:2) > Below is the DATA passed to yank handler: > > Debugger entered--entering a function: > * org--libreoffice-table-handler(application/x-libreoffice-tsvc #("1\0\11= \0002\0\11\0003\0\n\0004\0\11\0005\0\11\0005\0\n\0" 0 24 (foreign-selection= application/x-libreoffice-tsvc))) > yank-media() > > As you can see, the data contains \0 characters. Just to be sure that yank-media is not in the middle of encoding problem, can you say what (gui-get-selection 'PRIMARY 'application/x-libreoffice-tsvc) returns? If it contains NULL bytes too, then I would be completely clueless.