Re: Remove new line char

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Remove new line char
De : alexandru.dadalau (at) *nospam* meshparts.de (alexandru)
Groupes : comp.lang.tcl
Date : 20. Mar 2025, 12:56:50
Autres entêtes
Organisation : novaBBS
Message-ID : <539c6aa13dd5c919255a5500bc239cdc@www.novabbs.com>
References : 1 2 3 4 5 6 7
User-Agent : Rocksolid Light
On Thu, 20 Mar 2025 10:22:54 +0000, Harald Oehlmann wrote:

Hi Alexandru,
please allow me to share this wish 8.6.14 32 bit session:
>
Excel 2013 with a cell with the content "AÄ".
>

>
% clipboard get

>
% lmap i [split $c ""] {scan $i %c}
65 196 10
% string trimright $c "\x0a"

%
>
So, "string trimright \x0a" does the job for me.
>
Take care,
Harald
Harald, I think you indirectly showed me the causing issue: It's:
::twapi::read_clipboard 1
Somehow it does different things than "clipboard get".
In the twapi manual it states:
"The content is an exact copy of the contents of the clipboard in binary
format. Callers will need to use Tcl commands such as binary and
encoding to parse the data."
I tried
set text [encoding convertfrom cp1252 $text]
but no success.
--

Date Sujet#  Auteur
19 Mar 25 * Remove new line char23alexandru
19 Mar 25 +* Re: Remove new line char4Ralf Fassel
19 Mar 25 i`* Re: Remove new line char3alexandru
19 Mar 25 i `* Re: Remove new line char2Michael Soyka
20 Mar 25 i  `- Re: Remove new line char1alexandru
19 Mar 25 +- Re: Remove new line char1Arjen
19 Mar 25 +* Re: Remove new line char16Harald Oehlmann
19 Mar 25 i`* Re: Remove new line char15alexandru
19 Mar 25 i +- Re: Remove new line char1alexandru
19 Mar 25 i `* Re: Remove new line char13Rich
20 Mar 25 i  `* Re: Remove new line char12alexandru
20 Mar 25 i   `* Re: Remove new line char11alexandru
20 Mar 25 i    +* Re: Remove new line char9Harald Oehlmann
20 Mar 25 i    i`* Re: Remove new line char8alexandru
20 Mar 25 i    i `* Re: Remove new line char7Rich
21 Mar 25 i    i  `* Re: Remove new line char6Harald Oehlmann
21 Mar 25 i    i   `* Re: Remove new line char5Rich
21 Mar 25 i    i    +* Re: Remove new line char3alexandru
23 Mar 25 i    i    i`* Re: Remove new line char2Harald Oehlmann
24 Mar 25 i    i    i `- Re: Remove new line char1Ashok
23 Mar 25 i    i    `- Re: Remove new line char1Harald Oehlmann
20 Mar 25 i    `- Re: Remove new line char1Michael Soyka
20 Mar 25 `- Re: Remove new line char1Simon Geard

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal