Jose M Vidal
Jose M Vidal

Reputation: 9152

How do I enter unicode characters in eclipse?

I am running eclipse in Linux and while shift+control+U+1+1+1+1 works in other apps (where 1111 are the 4 digits of the unicode character in question) like firefox, it fails in eclipse.

I just want to add some special chars to my Java string.

Upvotes: 8

Views: 4918

Answers (2)

mcandre
mcandre

Reputation: 24602

Make the character in another program and copy it to Eclipse.

Upvotes: 6

Joey
Joey

Reputation: 354566

If all else fails, just use a Unicode escape:

String s = "\u1111";

Spares you the hassle of configuring charsets for your source files as well :)

Upvotes: 9

Related Questions