Re: [PATCHv2 2/2] speakup: Support spelling unicode characters

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

 



Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> writes:

> This supports spelling unicode characters by just passing them to
> the speech synthesis in direct mode.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
>
> 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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux