Character.UnicodeBlock in C#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • miztaken

    Character.UnicodeBlock in C#

    Hi there,

    char c;
    I want to know Character.Unico deBlock.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
  • =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=

    #2
    RE: Character.Unico deBlock in C#

    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.Enc oding namespace.


    --
    Ciaran O''Donnell
    try{ Life(); } catch (TooDifficultException) { throw Toys(); }



    "miztaken" wrote:
    Hi there,
    >
    char c;
    I want to know Character.Unico deBlock.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
    >

    Comment

    • Pavel Minaev

      #3
      Re: Character.Unico deBlock in C#

      On Aug 26, 3:27 pm, miztaken <justjunkt...@g mail.comwrote:
      Hi there,
      >
      char c;
      I want to know Character.Unico deBlock.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
      GetUnicodeCateg ory() 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.

      Comment

      Working...