Modified the match logic of test_settings_change_language for directional characters.

ref: Bug 883555