Non English ascii codes

Discussion in 'ASP .Net' started by !!bogus, Mar 22, 2005.

  1. !!bogus

    !!bogus Guest

    Hi,

    I am developing an english/arabic webpage. I have some fields that should
    accept only english characters and other fields that should accept only
    arabic. I use a custom validator for this. How can I figure out whether each
    one of those fields contain the appropriate values.

    Giving me the ascii ranges (or at least how to figure out the arabic ones)
    would be sufficient.

    I would need to do this in client and server side (both VB)

    --
    Thank you
    Please post only
     
    !!bogus, Mar 22, 2005
    #1
    1. Advertising

  2. !!bogus

    Joerg Jooss Guest

    !!bogus wrote:

    > Hi,
    >
    > I am developing an english/arabic webpage. I have some fields that
    > should accept only english characters and other fields that should
    > accept only arabic. I use a custom validator for this. How can I
    > figure out whether each one of those fields contain the appropriate
    > values.
    >
    > Giving me the ascii ranges (or at least how to figure out the arabic
    > ones) would be sufficient.


    There's no Arabian ASCII. You would need to use Unicode (e.g. UTF-8 or
    UTF-16 for the page encoding) here.

    Hopefully, all relevant Arabian characters have subsequent Unicode code
    points, so you would just need to check whether a char lies in a
    certain range. If not, you have to create some sort of lookup table.

    > I would need to do this in client and server side (both VB)


    I don't know if JavaScript supports Unicode. If it does, the approach
    is the same.

    Cheers,
    --
    http://www.joergjooss.de
    mailto:
     
    Joerg Jooss, Mar 22, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Greg  --
    Replies:
    4
    Views:
    2,170
  2. Replies:
    2
    Views:
    2,843
    Malcolm
    Aug 20, 2005
  3. softwarepearls_com
    Replies:
    10
    Views:
    4,755
    fylia
    Feb 26, 2009
  4. bruce
    Replies:
    38
    Views:
    277
    Mark Lawrence
    Nov 1, 2013
  5. MRAB
    Replies:
    0
    Views:
    98
Loading...

Share This Page