Problem copy pasting from internet browser to GTPlayground
I try to copy this code here https://www.facebook.com/ObjectProfile/posts/742756179144315 and paste it to Playground to do it. It inserts illegal characters. I am on MacOS Yosemite and tried Chrome and Safari. Workspace also has same issue. Is there a solution to this ? Copy pasting code from an internet browser is kinda a huge deal.
On 05 Dec 2014, at 22:17, kilon alios <kilon.alios@gmail.com> wrote:
I try to copy this code here
https://www.facebook.com/ObjectProfile/posts/742756179144315 <https://www.facebook.com/ObjectProfile/posts/742756179144315>
and paste it to Playground to do it. It inserts illegal characters.
I am on MacOS Yosemite and tried Chrome and Safari.
Workspace also has same issue. Is there a solution to this ? Copy pasting code from an internet browser is kinda a huge deal.
Confirmed. It seems to be a problem with the # character. Although the problem in my opinion is the encoding on the webpage. Workspace and Playground behave just as they should (which is to correctly display all characters).
On 06 Dec 2014, at 10:38, Max Leske <maxleske@gmail.com> wrote:
On 05 Dec 2014, at 22:17, kilon alios <kilon.alios@gmail.com> wrote:
I try to copy this code here
https://www.facebook.com/ObjectProfile/posts/742756179144315
and paste it to Playground to do it. It inserts illegal characters.
I am on MacOS Yosemite and tried Chrome and Safari.
Workspace also has same issue. Is there a solution to this ? Copy pasting code from an internet browser is kinda a huge deal.
Confirmed. It seems to be a problem with the # character. Although the problem in my opinion is the encoding on the webpage. Workspace and Playground behave just as they should (which is to correctly display all characters).
I had a look too. There is indeed an issue. You can inspect Clipboard clipboardText and you'll see that there are strange characters (probably related to the blue) around the symbol constants. Of course, these originate on the page. But if you copy and paste somewhere else, let's say a terminal (you can try the pbpaste command in Mac OS X), these are somehow filtered out, while Pharo does not seem to do that. I vaguely remember that when you copy something, multiple representations are actually copied, and during paste you select which one you want. Maybe something is wrong there. But apart from that, I would like to know how the filtering works. Sven
The problem is not even just MacOS related, I have experienced similar problems on UBUNTU but in that OS the problem exist when copying from Chrome it does not exist when copying from Firefox. But in MacOS even Firefox has the same issue.If I remember correctly Windows has same issues too. Generally speaking the workspace/Playground/Pharo should not allow the pasting of invisible / illegal characters since they would have no value to the user. On Sat, Dec 6, 2014 at 11:58 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 06 Dec 2014, at 10:38, Max Leske <maxleske@gmail.com> wrote:
On 05 Dec 2014, at 22:17, kilon alios <kilon.alios@gmail.com> wrote:
I try to copy this code here
https://www.facebook.com/ObjectProfile/posts/742756179144315
and paste it to Playground to do it. It inserts illegal characters.
I am on MacOS Yosemite and tried Chrome and Safari.
Workspace also has same issue. Is there a solution to this ? Copy pasting code from an internet browser is kinda a huge deal.
Confirmed. It seems to be a problem with the # character. Although the problem in my opinion is the encoding on the webpage. Workspace and Playground behave just as they should (which is to correctly display all characters).
I had a look too. There is indeed an issue. You can inspect
Clipboard clipboardText
and you'll see that there are strange characters (probably related to the blue) around the symbol constants. Of course, these originate on the page.
But if you copy and paste somewhere else, let's say a terminal (you can try the pbpaste command in Mac OS X), these are somehow filtered out, while Pharo does not seem to do that.
I vaguely remember that when you copy something, multiple representations are actually copied, and during paste you select which one you want. Maybe something is wrong there.
But apart from that, I would like to know how the filtering works.
Sven
On 06 Dec 2014, at 11:47, kilon alios <kilon.alios@gmail.com> wrote:
The problem is not even just MacOS related, I have experienced similar problems on UBUNTU but in that OS the problem exist when copying from Chrome it does not exist when copying from Firefox. But in MacOS even Firefox has the same issue.If I remember correctly Windows has same issues too.
Generally speaking the workspace/Playground/Pharo should not allow the pasting of invisible / illegal characters since they would have no value to the user.
But how do you determine what an âillegal characterâ is? You canât just exclude control characters or Unicode...
On Sat, Dec 6, 2014 at 11:58 AM, Sven Van Caekenberghe <sven@stfx.eu <mailto:sven@stfx.eu>> wrote:
On 06 Dec 2014, at 10:38, Max Leske <maxleske@gmail.com <mailto:maxleske@gmail.com>> wrote:
On 05 Dec 2014, at 22:17, kilon alios <kilon.alios@gmail.com <mailto:kilon.alios@gmail.com>> wrote:
I try to copy this code here
https://www.facebook.com/ObjectProfile/posts/742756179144315 <https://www.facebook.com/ObjectProfile/posts/742756179144315>
and paste it to Playground to do it. It inserts illegal characters.
I am on MacOS Yosemite and tried Chrome and Safari.
Workspace also has same issue. Is there a solution to this ? Copy pasting code from an internet browser is kinda a huge deal.
Confirmed. It seems to be a problem with the # character. Although the problem in my opinion is the encoding on the webpage. Workspace and Playground behave just as they should (which is to correctly display all characters).
I had a look too. There is indeed an issue. You can inspect
Clipboard clipboardText
and you'll see that there are strange characters (probably related to the blue) around the symbol constants. Of course, these originate on the page.
But if you copy and paste somewhere else, let's say a terminal (you can try the pbpaste command in Mac OS X), these are somehow filtered out, while Pharo does not seem to do that.
I vaguely remember that when you copy something, multiple representations are actually copied, and during paste you select which one you want. Maybe something is wrong there.
But apart from that, I would like to know how the filtering works.
Sven
don't know but what I do know is that I never had such an issue with another programming language or IDE. On Sat, Dec 6, 2014 at 1:11 PM, Max Leske <maxleske@gmail.com> wrote:
On 06 Dec 2014, at 11:47, kilon alios <kilon.alios@gmail.com> wrote:
The problem is not even just MacOS related, I have experienced similar problems on UBUNTU but in that OS the problem exist when copying from Chrome it does not exist when copying from Firefox. But in MacOS even Firefox has the same issue.If I remember correctly Windows has same issues too.
Generally speaking the workspace/Playground/Pharo should not allow the pasting of invisible / illegal characters since they would have no value to the user.
But how do you determine what an âillegal characterâ is? You canât just exclude control characters or Unicode...
On Sat, Dec 6, 2014 at 11:58 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 06 Dec 2014, at 10:38, Max Leske <maxleske@gmail.com> wrote:
On 05 Dec 2014, at 22:17, kilon alios <kilon.alios@gmail.com> wrote:
I try to copy this code here
https://www.facebook.com/ObjectProfile/posts/742756179144315
and paste it to Playground to do it. It inserts illegal characters.
I am on MacOS Yosemite and tried Chrome and Safari.
Workspace also has same issue. Is there a solution to this ? Copy pasting code from an internet browser is kinda a huge deal.
Confirmed. It seems to be a problem with the # character. Although the problem in my opinion is the encoding on the webpage. Workspace and Playground behave just as they should (which is to correctly display all characters).
I had a look too. There is indeed an issue. You can inspect
Clipboard clipboardText
and you'll see that there are strange characters (probably related to the blue) around the symbol constants. Of course, these originate on the page.
But if you copy and paste somewhere else, let's say a terminal (you can try the pbpaste command in Mac OS X), these are somehow filtered out, while Pharo does not seem to do that.
I vaguely remember that when you copy something, multiple representations are actually copied, and during paste you select which one you want. Maybe something is wrong there.
But apart from that, I would like to know how the filtering works.
Sven
I have experienced similar problems on UBUNTU but in that OS the problem exist when copying from Chrome it does not exist when copying from Firefox.
Because the default encoding of Pharo VM for Unix is not unicode. If you set it manually (--textenc UTF-8) it should work even with Chrome. Peter
If its a known issue with a known solution why is not default like this ? On Sat, Dec 6, 2014 at 6:48 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
I have experienced similar problems on UBUNTU but in that OS the problem exist when copying from Chrome it does not exist when copying from Firefox.
Because the default encoding of Pharo VM for Unix is not unicode. If you set it manually (--textenc UTF-8) it should work even with Chrome.
Peter
No, no. There might be a default encoder problem for the Linux VM, I don't know, it is not my main platform. If so, it might be better to default to UTF-8. Just check this page: http://zn.stfx.eu/unicode copy any part of the page and inspect Clipboard clipboardText asString I can see the correct unicode character value (not necessarily the right character, but that is a font problem). Copying any Unicode character works, AFAIK. The original problem with the script on https://www.facebook.com/ObjectProfile/posts/742756179144315 is not the a Unicode problem as such. The strange characters seem to be part of https://en.wikipedia.org/wiki/Unicode_control_characters more specifically they are a couple of https://en.wikipedia.org/wiki/Bi-directional_text control characters (like https://en.wikipedia.org/wiki/Left-to-right_mark). I am not sure what they do there. It seems that other programs receiving this clipboard contents somehow filter them out. Maybe all 'control' characters have to be removed. Anybody knows about/understands this stuff ?
On 06 Dec 2014, at 18:44, kilon alios <kilon.alios@gmail.com> wrote:
If its a known issue with a known solution why is not default like this ?
On Sat, Dec 6, 2014 at 6:48 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
I have experienced similar problems on UBUNTU but in that OS the problem exist when copying from Chrome it does not exist when copying from Firefox.
Because the default encoding of Pharo VM for Unix is not unicode. If you set it manually (--textenc UTF-8) it should work even with Chrome.
Peter
participants (4)
-
kilon alios -
Max Leske -
Peter Uhnák -
Sven Van Caekenberghe