split cjk detection to standalone filter function