Samuel Thibault <samuel.thiba...@ens-lyon.org> writes:

> This supports spelling unicode characters by just passing them to
> the speech synthesis in direct mode.
>
> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org>
>
> Index: linux-4.10/drivers/staging/speakup/main.c
> ===================================================================
> --- linux-4.10.orig/drivers/staging/speakup/main.c
> +++ linux-4.10/drivers/staging/speakup/main.c
> @@ -432,7 +432,7 @@ static void speak_char(u16 ch)
>       char *cp;
>       struct var_t *direct = spk_get_var(DIRECT);
>  
> -     if (direct && direct->u.n.value) {
> +     if (ch >= 0x100 || (direct && direct->u.n.value)) {
>               if (IS_CHAR(ch, B_CAP)) {
>                       spk_pitch_shift++;
>                       synth_printf("%s", spk_str_caps_start);
> @@ -443,8 +443,6 @@ static void speak_char(u16 ch)
>               return;
>       }

This is going to misidentify some Unicode characters >= 0x100 as
capital.  You probably want to add ch < 0x100 tests to the if(is_char
...) conditions, like you did in spell_word.  Please resend with that
fix and you'll get my Reviewed-by line.

Regards,
-- Chris
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to