View previous topic :: View next topic |
Author |
Message |
MVV Power Member


Joined: 03 Aug 2008 Posts: 7983 Location: Russian Federation
|
|
Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 35077 Location: Switzerland
|
Posted: Fri Jun 04, 2010 2:50 am Post subject: |
|
|
This is a known Windows bug: When you call SetClipboardData(CF_TEXT,..) and do not explicitly set the encoding, Windows seems to use the current keyboard layout for the encoding. Since TC ignores the encoding setting of the clipboard when you paste a button, this doesn't matter for copying/pasing buttons, it only matters when you want to paste the button details somewhere else.
I even have a fix for this bug in TC: Call SetClipBoarddata(CF_LOCALE,...). I just didn't use it in this function because it wasn't meant to copy button data anywhere else... _________________ Author of Total Commander
http://www.ghisler.com |
|
Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 7983 Location: Russian Federation
|
|
Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 35077 Location: Switzerland
|
Posted: Sun Jun 06, 2010 4:10 am Post subject: |
|
|
Quote: | why TC can't copy Unicode text to clipboard? |
I'm using UTF-8 for compatibility reasons, but only in fields which contain characters from other codepages. _________________ Author of Total Commander
http://www.ghisler.com |
|
Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 7983 Location: Russian Federation
|
Posted: Sun Jun 06, 2010 7:19 am Post subject: |
|
|
I don't understand. When you're copying text to clipboard, you can copy it in any encoding (just specify right one for clipboard format), and when you're pasting text from clipboard, you can choose in which encoding you want to see it, so it won't be a problem if you copy Unicode text in TC 7.55 and then try to paste it in local ANSI codepage in TC 7.04a e.g. - Windows will convert text for you (you just need to specify encoding).
{Get|Set}ClipboardData functions have format parameter that can be CF_TEXT for ANSI text and CF_UNICODETEXT for Unicode text, you can choose any of them for both functions and OS will do the rest.  _________________ TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel… |
|
Back to top |
|
 |
luckylee Junior Member

Joined: 21 Mar 2014 Posts: 2
|
Posted: Sun Mar 23, 2014 1:14 pm Post subject: |
|
|
ghisler(Author) wrote: | Quote: | why TC can't copy Unicode text to clipboard? |
I'm using UTF-8 for compatibility reasons, but only in fields which contain characters from other codepages. |
I believe UTF-8 is more universal encoding than Unicode. |
|
Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 7983 Location: Russian Federation
|
|
Back to top |
|
 |
DrShark Power Member


Joined: 03 Nov 2006 Posts: 1012 Location: Kyiv, 68/262
|
Posted: Sat Mar 17, 2018 4:33 am Post subject: Re: Button is copied in wrong encoding with another layout |
|
|
MVV wrote: | E.g. I have buttonbar button with Russian hint. If I have EN keyboard layout active when copying button via context menu, TC copies button code in wrong encoding (even when I paste text into Unicode application, text is wrong), but if I switch to RU all is right.
Does TC copy button code in ANSI? Or why such bug occurs? |
2MVV
Isn't this issue fixed already? It seems it was fixed even before adding a support for pasting of a Unicode text to a button bar in TC 9.10.
If yes, maybe this topic should be moved to fixed bugs? _________________ Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence
Cuz we're all in this together, We're here to make it right |
|
Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 7983 Location: Russian Federation
|
|
Back to top |
|
 |
|