Non English ascii codes

  • Thread starter Thread starter !!bogus
  • Start date Start date
B

!!bogus

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)
 
!!bogus said:
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,
 
Back
Top