Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Show code point of the current character
Show code point of the current character [message #515559] Fri, 19 February 2010 11:47 Go to next message
Bob Roberts is currently offline Bob RobertsFriend
Messages: 2
Registered: February 2010
Junior Member
Is there a way to find the code point of a specific character in the text editor?

This sounds like a pretty basic and very useful functionality but I can't find it.

Thanks for your help,

BR
Re: Show code point of the current character [message #515568 is a reply to message #515559] Fri, 19 February 2010 12:05 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Bob Roberts wrote:
> Is there a way to find the code point of a specific character in the
> text editor?
The characters that the editor shows are in Unicode, so I don't quite
understand your question. Do you mean what encoding the file on disk has?

Dani
>
> This sounds like a pretty basic and very useful functionality but I
> can't find it.
>
> Thanks for your help,
>
> BR
Re: Show code point of the current character [message #515570 is a reply to message #515568] Fri, 19 February 2010 12:15 Go to previous messageGo to next message
Bob Roberts is currently offline Bob RobertsFriend
Messages: 2
Registered: February 2010
Junior Member
When I open a utf-8 encoded file in eclipse, ideally I'd like it to show me the codepoint (e.g. U+0660) of the character the cursor is placed on. Or at least, give me a way to find out its codepoint.
Re: Show code point of the current character [message #515583 is a reply to message #515570] Fri, 19 February 2010 13:02 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Bob Roberts wrote:
> When I open a utf-8 encoded file in eclipse, ideally I'd like it to
> show me the codepoint (e.g. U+0660) of the character the cursor is
> placed on. Or at least, give me a way to find out its codepoint.
I see. There's nothing in the SDK that does this for you but it
shouldn't be too hard to implement this on your own.

Dani
Re: Show code point of the current character [message #515586 is a reply to message #515570] Fri, 19 February 2010 13:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Bob,

Java's character representation is effectively like UTF-16. You'd need
to use Java itself to deal with the relationship between surrogate pair
characters and the code point they represent, i.e.,
Character.isHighSurrogate/isLowSurrogate, and methods like
Character.codePointAt or the corresponding String methods dealing with
code points.


Bob Roberts wrote:
> When I open a utf-8 encoded file in eclipse, ideally I'd like it to
> show me the codepoint (e.g. U+0660) of the character the cursor is
> placed on. Or at least, give me a way to find out its codepoint.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Text compare colors unchanged part wrong
Next Topic:multiple version of the same plugin in IDE
Goto Forum:
  


Current Time: Fri Apr 26 19:55:06 GMT 2024

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

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

Back to the top