[AC sjt-xft] Refactor charset/lang checking