Page 1 of 1

Copying code in Windows Edge

Posted: Thu Oct 27, 2016 3:52 pm
by tastyraspberry
Hi all,

I seem to be having trouble copying (Ctrl + C, or Right click) code from the forum. I am using Windows Edge but when I copy a (random sample) eg

Code: Select all

InitSprite() 
InitKeyboard() 

#ScreenWidth  = 1024 
#ScreenHeight = 768 
#ScreenBits  = 32 
#MiddleX  = #ScreenWidth  / 2 
#MiddleY  = #ScreenHeight / 2 
#Radius = 600

Define grad.f = 0

Structure Vector
x.f
y.f
EndStructure
I get a lot of syntax errors when compiling it. It seems, after copying it into Notepad++ and then changing the encoding to ANSI I get a lot of  symbols inserted into the text which throws the compiler.

Code: Select all

InitSprite() 
InitKeyboard() 

#ScreenWidth  = 1024 
#ScreenHeight = 768 
#ScreenBits   = 32 
#MiddleX      = #ScreenWidth  / 2 
#MiddleY      = #ScreenHeight / 2 
#Radius       = 600

Define grad.f = 0

Structure Vector
  x.f
  y.f
EndStructure
My questions are:
Is there a quick fix to this?

Should I change the encoding of PB (I am a bit wary of changing things as I nearly always to forget what I've changed and then I'm in a complete mess)?

Should I just change my browser?
Can I fix it from the browser?

I will continue to investigate but would welcome any feedback or similar issues.

Michael

Re: Copying code in Windows Edge

Posted: Fri Oct 28, 2016 11:30 am
by Bisonte
You should go to Preferences -> Compiler -> Defaults -> and here : Source File Text Encoding : UTF8 ! (not Plain Text)

Re: Copying code in Windows Edge

Posted: Fri Oct 28, 2016 9:56 pm
by tastyraspberry
Well, yes, I did that but the problem persists. When I copy from the website to the editor I get lots of 'xA0' (if I 'reveal' them with notepad++) pasted in and it really doesn't like it. It always throws an syntax error.

I'm a bit perplexed now..

Michael