Skip to main content



      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 06:47 Go to next message
Eclipse UserFriend
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 07:05 Go to previous messageGo to next message
Eclipse UserFriend
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 07:15 Go to previous messageGo to next message
Eclipse UserFriend
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 08:02 Go to previous messageGo to next message
Eclipse UserFriend
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 08:10 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Text compare colors unchanged part wrong
Next Topic:multiple version of the same plugin in IDE
Goto Forum:
  


Current Time: Wed Apr 30 19:11:46 EDT 2025

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

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

Back to the top