validate string - only specific language characters

.net, c#, javascript, jquery

Solution

@CD, so sure you can do that.

In C#, just:

string str = "this text has arabic characters";
bool hasArabicCharacters = str.Any(c => c >= 0xFB50 && c <= 0xFEFC);

Problem

Is there a way to check if a string contains characters of a given language only? (for example Japanese, Hebrew, Arabic) I'm wondering if there is a way implementing this kind of validation in Javascript\Jquery and in c#? EDIT I'm not willing to check if the string contains valid words of a specific language dictionary. I'd like to validate that all characters belong to that language.

Original source