|
|
Home » Developing U++ » U++ Developers corner » [Proposal] The maintainer and the future of TURTLE package
Re: [Proposal] The maintainer and the future of TURTLE package [message #54652 is a reply to message #54491] |
Wed, 26 August 2020 17:12 |
Oblivion
Messages: 1093 Registered: August 2007
|
Senior Contributor |
|
|
Hello Mirek,
I have ancountered a curious problem while testing the Turtle/VirtualGui port.
(Note: This is tested on a Linux machine with default LANG=UTF-8 encoding. and this problem affects both old and new Turtle packages as the VirtualGui package shares the same clipboard code.)
The problem is GetWString and GetString do not work properly if called on a clipboard text.
TextCtrl derived classes are affected by this, as they use the same mechanism.
Sreenshot with explanation:
Now, the culprit seems to be the VirtualGui clipboard String/WString conversion code (VirtualGui/Clip.cpp, 64-86):
String GetString(PasteClip& clip)
{
GuiLock __;
if(clip.Accept("wtext")) {
String s = ~clip;
return WString((const wchar *)~s, wstrlen((const wchar *)~s)).ToString(); / << Adds random chars. Why is this though? It is already a string. For charset conversion?
// return ToUtf16(s).ToString(); // Seems to work fine...
// return s.ToWString().ToString(); // Seems to work fine...
}
if(clip.IsAvailable("text"))
return ~clip;
return Null;
}
WString GetWString(PasteClip& clip)
{
GuiLock __;
if(clip.Accept("wtext")) {
String s = ~clip;
return WString((const wchar *)~s, wstrlen((const wchar *)~s)); // Adds random chars...
// return ToUtf16(s); // Seems to work fine...
// return s.ToWString(); // Seems to work fine...
}
if(clip.IsAvailable("text"))
return (~clip).ToWString();
return Null;
}
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 26 August 2020 17:18] Report message to a moderator
|
|
|
|
|
[Proposal] The maintainer and the future of TURTLE package
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Tue, 28 July 2020 17:42
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Wed, 29 July 2020 11:15
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Fri, 31 July 2020 10:37
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Wed, 26 August 2020 17:12
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Thu, 27 August 2020 10:35
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Fri, 28 August 2020 14:59
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Fri, 28 August 2020 15:41
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Fri, 28 August 2020 16:57
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Mon, 31 August 2020 21:34
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Tue, 05 January 2021 11:16
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Tue, 05 January 2021 11:39
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Tue, 05 January 2021 16:12
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Tue, 05 January 2021 16:48
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Tue, 05 January 2021 16:52
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Tue, 05 January 2021 17:56
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Tue, 05 January 2021 18:00
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Tue, 05 January 2021 19:05
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Tue, 05 January 2021 20:22
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Sun, 10 January 2021 05:28
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Sun, 10 January 2021 18:41
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Tue, 12 January 2021 03:14
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Tue, 12 January 2021 06:48
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Tue, 12 January 2021 07:15
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Tue, 12 January 2021 09:03
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Tue, 12 January 2021 20:33
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Tue, 12 January 2021 20:38
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Tue, 19 January 2021 09:34
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Novo on Tue, 19 January 2021 17:09
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Thu, 07 January 2021 10:15
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Thu, 07 January 2021 13:40
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: Oblivion on Thu, 07 January 2021 15:16
|
|
|
Re: [Proposal] The maintainer and the future of TURTLE package
By: mirek on Thu, 07 January 2021 15:30
|
Goto Forum:
Current Time: Mon Apr 29 12:39:29 CEST 2024
Total time taken to generate the page: 0.03047 seconds
|
|
|