Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Invisible garbage chars in text input into Eclipse(input errors)
Invisible garbage chars in text input into Eclipse [message #1784838] Wed, 04 April 2018 16:31 Go to next message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 87
Registered: March 2018
Member
In entering Java code I copied from a tutorial video by ProgrammingKnowledge I encountered a line of code marked wrong by Eclipse. I couldn't see anything wrong with it, however. I copied the identical line from the code provided by Mr. Ream. It was not marked wrong. So what was wrong. I've seen "normal" C code that won't compile. So I made a hex dump of the two apparently identical strings of characters and found several differences.


09 20 20 20 09 09 09 53 74 72 69 6E 67 20 71 75 65 72
                           0A 09 53 74 72 69 6E 67 20 71 75 65 72

79 20 3D 20 20 22 73 65 6C 65 63 74 20 45 49 44 2C 20
79 20 3D E2 80 9C 73 65 6C 65 63 74 20 45 49 44 2C 20

4E 61 6D 65 2C 20 53 75 72 6E 61 6D 65 2C 20 41
4E 61 6D 65 2C 20 53 75 72 6E 61 6D 65 2C 20 41

67 65 20 66 72 6F 6D 20 45 6D 70 6C 6F 79 65 65 49 6E
6F 6D 20 45 6D 70 6C 6F 45 6D 70 6C 6F 79 65 65 49 6E

66 6F 22 3B
66 6F 22 3B

20 20

67 65 20 66 72

The above two squibs occur like junk DNA in the midst of the second line of code. I had to delete them to make the lines match up. Several non-ASCII and other differences occur.

Anything under hex 20 or over hex 7F should not be there.

It seems clear that garbage somehow got into the string that I had typed into my computer. Running Text Wrangler's "zap gremlins" didn't fix the problem, which is disappointing. I've had this problem before and once made a little utility program in C called TexLax that takes in a string and only outputs characters in the normal ASCII range. I guess I'll have to find it or make another one.

Here is a screen shot of the two lines. See for yourself:

Re: Invisible garbage chars in text input into Eclipse [message #1784839 is a reply to message #1784838] Wed, 04 April 2018 16:40 Go to previous messageGo to next message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 87
Registered: March 2018
Member
P.S. I removed the faulty line. The error marked for the next line was no longer there. I tried to compile and got a big fat red circle and no explanation. I rebooted my computer, tried again, and it worked perfectly.
I think that beginners may not realize that code can get contaminated somehow, and therefore lose lots of time overthinking the problem when it may be solved simply by retyping the errant line of code.
This may be a Mac problem and not an Eclipse problem.
Re: Invisible garbage chars in text input into Eclipse [message #1785017 is a reply to message #1784839] Sat, 07 April 2018 07:56 Go to previous messageGo to next message
Avi Abrami is currently offline Avi AbramiFriend
Messages: 29
Registered: December 2017
Junior Member
Sometimes text that you copy from a non-Eclipse application and paste to Eclipse contains non-printable characters, for example Unicode bi-directional control characters or the null character whose Unicode code-point is 0 (zero). I know that in Notepad++ editor, null characters are displayed (as "null").
Re: Invisible garbage chars in text input into Eclipse [message #1785344 is a reply to message #1785017] Thu, 12 April 2018 19:32 Go to previous message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 87
Registered: March 2018
Member
I'm pretty sure that I entered problematical stuff directly in Eclipse. Recently I found another case where one line was flagged as wrong. It looked o.k. to me. I typed the same line directly above it, commented the old line out, and the newly typed line was accepted. I thought that surely I had captured the problem in a couple of short lines of code. I did a hex dump on both of them and there was no difference whatsoever. Uncommenting the original line and taking out the recopied line made the problem reappear.

I don't remember whether it was CodeWarrior for C compiling or maybe some earlier product, but I occasionally found code that would not compile. If I ran it through my TexLax program that filtered out all characters outside the normal ASCII range, and then recompiled it would sail right on through.

I've kept on working through the ProgrammingKnowledge tutorials because I think I can have just what I need by modestly reconfiguring his application. However it is a rather nasty process because the code cannot be viewed in the "design" mode. So moving labels and text boxes around has to be a sort of trial and error procedure.

Previous Topic:BugReport
Next Topic:WindowBuilder Design is Updown
Goto Forum:
  


Current Time: Fri Nov 16 03:19:25 GMT 2018

Powered by FUDForum. Page generated in 0.03317 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top