Home Ask Login Register

Developers Planet

Your answer is one click away!

Link1600 February 2016

Error when pasting from jGrasp to OneNote then back to jGrasp - Java

This is the first time I post something to Stack Over Flow. So, I'm having a techinical problem when I am copying my code from OneNote.

So, what I do is I watch the video lectures my professor has on YouTube, and I also create a copy of his code on jGrasp on my Mac, then I copy it into OneNote 2016 to store it as future reference. Well, the other day I tried to copy the code back into jGrasp from OneNote, and when I try to compile it, I get the following error, about 15 times:

MathFun.java:2: error: illegal character: '\u00a0' {   ^

I have found a way around this - if I copy into TextEdit first, which doesn't have formating, and then into OneNote, and then back into jGrasp, it works.


jGrasp --> OneNote --> jGrasp

= Error

jGrasp --> TextEdit --> OneNote --> jGrasp

!= Error (No error)

I can use this work around, but it would be way nice if I didn't have to retype all the code I have already written just to run it in jGrasp again. Any susjestions?


P.S.: This is my code from this example:

public class MathFun
   public static void main (String[] args)





lbarowski February 2016

That character is a non-breaking space, so probably OneNote is substituting it for ordinary spaces. Try "Edit" > "Paste Special" in jGRASP and see if a plain text paste will avoid this. Otherwise, you could find and select one of the non-breaking spaces (looks like a space, shows code 160 in the message bar) then do a Ctrl-F and replace with regular spaces.

Post Status

Asked in February 2016
Viewed 2,333 times
Voted 11
Answered 1 times


Leave an answer

Quote of the day: live life