Detect Cyrillic / Japanese / Thai / Gurmukhi #2

Closed
FGRibreau opened this Issue Aug 5, 2011 · 0 comments

Projects

None yet

1 participant

@FGRibreau
Owner

Cyrilic Hiragana Thai Gurmukhi:

var text = tweet.getStatus().text;

// 0400 - 04FF: Cyrillic
// 3040 - 309F: Hiragana (Japanese)
// 0E00 - 0E7F: Thai
// 0A00 - 0A7F: Gurmukhi (Indian)
return !(/[\u0400-\u04FF\u3040-\u309F\u0E00-\u0E7F\u0A00-\u0A7F]+/.test(text));

@FGRibreau FGRibreau closed this Jan 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment