Once in a while, I get comments like these:
è天æç¼å,让æå¨æçä¹å¹´å¾ä»¥è§å¾å¦æ¤ç²¾å½©ç»ä¼¦çå¸åã
They are absolutely useless to me. I don’t even know if it’s Chinese / Japanese / Korean / …
How can I tell WordPress to automatically delete (not just spam) those messages?
Those characters you quoted here are Han (used by Chinese language), as they matched by the unicode character property
p{Han}
.You can perform a regular expression search in a plugin like so:
The control function
wpse_116973_has_unallowed_char()
searches for all characters of Chinese (Han), Korean(Hangul) and Russian (Chyrillic) languages. The plugin move those comments to trash.If someone just want to mark them as spam, use the filter
pre_comment_approved
like this:You can use the built in black list function in Dashboard > Settings > Discussion
http://www.example.com/wp-admin/options-discussion.php
, add a few characters from the alphabet you want to exclude and it won’t bother you again…I guess.