« ICANN Approves .XXX Domain Old ASRG Archives »
Removing Vowels from Hebrew Unicode Text
Posted June 3, 2005 – 4:28 pm by Yakov Shafranovich in ProgrammingOne of the questions that recently came up is how to remove vowels from Hebrew characters in Unicode (or any other similar language). A quick look at Hebrew Unicode chart shows that the vowels are all located between 0×0591 (1425) and 0×05C7 (1479). With this and Javascript’s charCodeAt function, it is trivial to strip them out:
function stripVowels(rawString)
{
var newString = '';
for(j=0; j<rawString.length; j++) {
if(rawString.charCodeAt(j)<1425
|| rawString.charCodeAt(j)>1479)
{ newString = newString + rawString.charAt(j); }
}
return(newString);
}
You can test it below:
Tags: dhtml, javascript, unicode
Permalink | Trackback URL | This post has 971 Views














