How to deal with Arabic string in java
Hi every one,
I need to remove arabic diactries from the input text..
I had tried this code but it take to much time to complete,
Code:
for ( int index = 0 ; index < word.length() ; index++)
{
char x = word.charAt(index);
if ((x >= 'ء' && x <= 'غ') || (x >= 'ف' && x <= 'ي'))
wordAfter += x;
}
and it maybe delete wanted characters, also, I had tried using replaceAll() but I did not success with it
Som is there other ways to remove them, such as using Normalize class???
Thanks
Re: How to deal with Arabic string in java
Re: How to deal with Arabic string in java
I think each character is represented by a byte, not char. Try using the get bytes()
Re: How to deal with Arabic string in java
Quote:
Originally Posted by
Lyricalextreme
I think ...
Don't think. If you want to help, research first so you don't post garbage.
db