Fix bug: language switch command skipped when langauge id contains "-" letter

This PR fixes language switch command "\\~" issue:
Language switches with "Japanese-en", "Korean-en", and "Serbian-Cyrillic" are simply ignored.
Please see the test case "065" for detail.