[PATCH] speakup: Fix bogus caps on speaking unicode characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 33590c185299 ("speakup: Support spelling unicode characters")
mistakenly passed unicode characters to IS_CHAR(), which only
supports latin1.  Let's assume non-latin1 is lower case, like is done
in spell_word().

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index dc07b23..6f15957 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -433,12 +433,12 @@ static void speak_char(u16 ch)
 	struct var_t *direct = spk_get_var(DIRECT);
 
 	if (ch >= 0x100 || (direct && direct->u.n.value)) {
-		if (IS_CHAR(ch, B_CAP)) {
+		if (ch < 0x100 && IS_CHAR(ch, B_CAP)) {
 			spk_pitch_shift++;
 			synth_printf("%s", spk_str_caps_start);
 		}
 		synth_putwc_s(ch);
-		if (IS_CHAR(ch, B_CAP))
+		if (ch < 0x100 && IS_CHAR(ch, B_CAP))
 			synth_printf("%s", spk_str_caps_stop);
 		return;
 	}
_______________________________________________
Speakup mailing list
Speakup@xxxxxxxxxxxxxxxxx
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux