Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
an error while copying code
#1
i don't know if to call it an error,
but when i try to copy code from messages in the forum - it writes me this patch named - NBSP
which takes up all the spaces of the space key....

have anyone encountered that ?

i added a screen-shot

Attached Files

Thumbnail(s)
   
Reply
#2
That's odd.

NBSP (so far as I know) is a HTML Non-breaking Space.

In which Forum post did you encounter that?

To add...

I've just checked a number of different posts and I'm seeing this same thing.
I've also checked my own posted code, which I know was fine right after I posted it, but now it has this same forming error, so something must have changed, server side, which has broken the code formatting.
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply
#3
yep...
Reply
#4
Looking at the page source, there's a close script tag on line 30 to 38 or thereabouts (depending on the page being viewed), which I don't think should be there. I don't know if that will cause the issue that we're seeing, or even if that tag is indeed correct (it's been some time since I did any HTML coding).

Just what I'm seeing at my end.
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply
#5
@snippsat

For some reason, in posted code blocks, the space (32) is now a NBSP (160). Why is this please?
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply
#6
(Dec-04-2022, 11:05 AM)rob101 Wrote: @snippsat

For some reason, in posted code blocks, the space (32) is now a NBSP (160). Why is this please?
It's show NBSP for space and that is correct,this only show if inspect the code.
It should not be there when copy code out.

@astral_travel
I did try PyChram and can not get output that you show.
if have problem in in PyChram,set Copy selection as plain text.
Reply
#7
(Dec-04-2022, 01:27 PM)snippsat Wrote:
(Dec-04-2022, 11:05 AM)rob101 Wrote: @snippsat

For some reason, in posted code blocks, the space (32) is now a NBSP (160). Why is this please?
It's show NBSP for space and that is correct,this only show if inspect the code.
It should not be there when copy code out.

@astral_travel
I did try PyChram and can not get output that you show.
if have problem in in PyChram,set Copy selection as plain text.

Thank you for the reply.

As Astral discovered, it is the now case, with a C&P of a code block, which is when I tried the same. This was not the case (and therefore not an issue) a few days back, so something has changed within the last few days. It could be even as far back as a week, but I can't say for sure, as I can't remember the last time a did a code block C&P, but I do know that I'm not doing anything different my end, but the C&P is now picking up char 160, whereas it did not do that before.

If nothing has changed, server side, then this is a very confusing turn of events, which I'm at a loss as to the reason, except that I have had an update to Firefox, so maybe it's Firefox that has broken this?



Update: I've just fired up Chromium, and all is well with a code block C&P, so it seems that Firefox is to blame.
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply
#8
You know that you should double click in the python code box,then it select all of code,then copy.
I can get the it to copy the invincible NBSP when i use mouse to drag mouse over code in FireFox then copy code.

So try double click in code box,then copy and it should be ok.
rob101 likes this post
Reply
#9
(Dec-04-2022, 02:39 PM)snippsat Wrote: You know that you should double click in the python code box,then it select all of code,then copy.
I can get the it to copy the invincible NBSP when i use mouse to drag mouse over code in FireFox then copy code.

So try double click in code box,then copy and it should be ok.

Ah... I did not realize that: I've been doing the 'drag' method, which, again, has been fine up until very recently, but yes, I do get the correct C&P with a double click.

Thank you.
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply
#10
(Dec-04-2022, 02:39 PM)snippsat Wrote: You know that you should double click in the python code box,then it select all of code,then copy.
I can get the it to copy the invincible NBSP when i use mouse to drag mouse over code in FireFox then copy code.

So try double click in code box,then copy and it should be ok.

yep you are correct snippsat... - that solved the problem,

thank you !
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Copying a file Kundan 1 2,082 Aug-21-2019, 09:55 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020