Character.UnicodeBlock in C#

  • Thread starter Thread starter miztaken
  • Start date Start date
M

miztaken

Hi there,

char c;
I want to know Character.UnicodeBlock.of(c) in C#.
Its available in Java but how can this be done in C#?

I dont see UnicodeBlock Structure in C#.

Please help me

Thank You
miztaken
 
What are you trying to achieve. I am not familiar with the Java functions.
Most things to deal with encoding are in the System.Text.Encoding namespace.
 
Hi there,

char c;
I want to know Character.UnicodeBlock.of(c) in C#.
Its available in Java but how can this be done in C#?

I dont see UnicodeBlock Structure in C#.

Some of its functionality is covered by UnicodeCategory type, and
GetUnicodeCategory() method. However, it does not cover named Unicode
blocks (such as Greek or Cyrillic). The closest you can get to that,
as far as I know, is to use regexes such as @"\p{IsGreek}". If you
need to determine the category, rather than checking whether a
character belongs to some specific category, then it could be done
with a regex which chooses between all possible named groups inside
subexpressions, and then get the number of subexpression that matched.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top