Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Source Code shows as rectangles instead of charactars
Source Code shows as rectangles instead of charactars [message #678811] Thu, 09 June 2011 15:29 Go to next message
Claus Hausberger is currently offline Claus HausbergerFriend
Messages: 6
Registered: June 2011
Junior Member
Hello,

I've a very weird problem:

after upgrading from Ubuntu 9.04. to 11.04 (new installation), I have weird problems with the Eclipse editor.

When writing Java code (new Project was created) I type

System.out.println("bla")

and then "out" is shown as rectangles only. Weird is that for about half a second I see "System.out.println" and then the editor changes it to System.[][][].println (not really [] (here I used two brackets), it is shown as rectangles).
See the attached file for an example.

This is very weird. I've never had this before with any Ubuntu, Java or Eclipse version.

Currently, I use: Ubuntu 11.04. Eclipse 3.6 (latest download from June 7th) and Java 1.6.0_25.

Eclipse and Ubuntu Terminal is set to UTF-8.

The problem also happens when using KDE instead of Gnome.

Any ideas what could be wrong here and how to fix this?

Claus
Re: Source Code shows as rectangles instead of charactars [message #681739 is a reply to message #678811] Thu, 09 June 2011 18:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Rich Kulp

Hi,

I think that usually indicates that those characters were written in a
different charset than what the display can handle.

Verify that you do not have the file (through the Eclipse properties
dialog on the file) have a strange character set.

--
Thanks,
Rich Kulp
Re: Source Code shows as rectangles instead of charactars [message #682297 is a reply to message #681739] Fri, 10 June 2011 19:43 Go to previous messageGo to next message
Claus Hausberger is currently offline Claus HausbergerFriend
Messages: 6
Registered: June 2011
Junior Member
I checked the file.

It says Default (inherited from containter), UTF-8.

My locale on Linux says:

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en

$ echo $LANG
en_US.UTF-8
$ echo $LANGUAGE
en_US:en

So everything looks like UTF-8 which should be fine.
This also happens with completely new files (after creating a new class, for example).

Claus



Re: Source Code shows as rectangles instead of charactars [message #682306 is a reply to message #682297] Fri, 10 June 2011 20:00 Go to previous messageGo to next message
Claus Hausberger is currently offline Claus HausbergerFriend
Messages: 6
Registered: June 2011
Junior Member
I did another test. I copied the text with the rectangles and pasted it into gedit. There it looked correct and I saw "out" instead of rectangles.

Claus

[Updated on: Fri, 10 June 2011 20:00]

Report message to a moderator

Re: Source Code shows as rectangles instead of charactars [message #682328 is a reply to message #681739] Fri, 10 June 2011 20:51 Go to previous messageGo to next message
Claus Hausberger is currently offline Claus HausbergerFriend
Messages: 6
Registered: June 2011
Junior Member
event stranger:

When I type:

Syste.out.println("bla"); // leave out "m" in System

it shows correctly. The very moment I add that missing "m", "out" turns into rectangles.

Claus
Re: Source Code shows as rectangles instead of charactars [message #683955 is a reply to message #678811] Tue, 14 June 2011 18:29 Go to previous messageGo to next message
Claus Hausberger is currently offline Claus HausbergerFriend
Messages: 6
Registered: June 2011
Junior Member
Another weird thing. This source code looks correctly as long as it doesn't compile because of syntax errors.
But after it compiles correctly "out" turns into rectangles. I can now see this on several computers with the latest Eclipse and Java versions. I think this is a bug.

Claus
Re: Source Code shows as rectangles instead of charactars [message #684026 is a reply to message #678811] Tue, 14 June 2011 21:45 Go to previous message
Claus Hausberger is currently offline Claus HausbergerFriend
Messages: 6
Registered: June 2011
Junior Member
I figured it out. It was a font problem. Somehow Eclipse cannot display the standard font (maybe Ubuntu does not install that font anymore).

When changing the font, everything looks ok again.

Claus
Previous Topic:Signed jar problem
Next Topic:Package annotations, package-info.java and autocompletion
Goto Forum:
  


Current Time: Tue Mar 19 02:43:44 GMT 2024

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

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

Back to the top