Re: Remove new line char

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Remove new line char
De : wortkarg3 (at) *nospam* yahoo.com (Harald Oehlmann)
Groupes : comp.lang.tcl
Date : 21. Mar 2025, 08:32:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vrj4ml$12e07$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
Am 20.03.2025 um 19:03 schrieb Rich:
alexandru <alexandru.dadalau@meshparts.de> wrote:
I tried
>
set text [encoding convertfrom cp1252 $text]
>
but no success.
 Are you sure the clipboard is cp1252?
 If it is utf-8 then converting as if it is cp1252 will create strange
results.
Dear Rich,
the Windows clipboard is more complicated/sophisticated.
Each entry has a type. This is nowdays mostly CF_UNICODETEXT, which is 16 bit unicode.
A sending application can put an entry into the clipboard in multiple formats and the receiving application can pick one or more.
You see that, if you paste a word snippet into LibreOffice. You have multiple options: paste normal (which is Rich Text Format), paste as text (which is a unicode string).
And types may be image, file, folder,...
https://learn.microsoft.com/en-us/windows/win32/dataxchg/clipboard-formats
We have often "enhanced" this code in TCL to adopt it to modern usage. There should not be any issues with the encoding, expect that the sending application does anything strange.
Take care,
Harald

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