Niqqud
Niqqud apparently count as a letter. Sometimes, they need to be removed:
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<title>Niqqud</title>
<script type="text/javascript">
function print(t) {
document.getElementById('out').innerHTML += t + '<br>';
}
function do_word(word) {
print('Length of ' + word + ' = ' + word.length);
}
function main() {
word_german = 'äöü';
word_hebrew = 'אָדָם';
//
// Remove Niqqud
//
word_hebrew_without_niqqud = word_hebrew.replace(/[\u0591-\u05C7]/g, '');
do_word(word_german);
do_word(word_hebrew);
do_word(word_hebrew_without_niqqud);
}
</script>
</head>
<body onload='main()';>
<div id='out'>
</div>
</body>
</html>