Re: Several problems with the unicode support (was [patch 0/3] speakup: support 16bit unicode screen reading)

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

 



Hello,

Zahari Yurukov, on lun. 13 mars 2017 02:34:35 +0200, wrote:
> > That'd get an even more odd situation: characters below 256 would be
> > spoken in "english", while others would be spoken in the espeakup
> > language.  We should be able to just get the direct mode working fine
> > for everything.
> 
> Yes, but speakup might also be localized, eventually.

Well, speakup is localizable since a long time, but one can only notice
that it hasn't been actually localized since, while espeak does have
everything in place, so why not just use that and be done.

> And now you lose them in English, too.

I don't understand this. Is there perhaps yet another bug that wasn't
fixed or reported?

> And if you won't support those characters, why cut them, instead of letting the synthesizer to handle them?  You're not losing anything. The synthesizers that don't support them skip them anyway.

Right :)

> Though I'd love to translate speakup in Bulgarian. I can't wait for the unicode support to be available for the internal messages, smile.

We'd have to think and code a bit about this. The kernel actually uses
ucs-2 encoding, while people will probably rather feed the internal
messages as utf-8 strings. But one has to know whether it's utf-8 or
some 8bit character set which is being used. That question is actually
related to pasting, for which we need to know the same :)

Samuel
espeak doesn't speak spaces unless strongly being told to do so :)

--- a/espeak.c
+++ b/espeak.c
@@ -170,9 +170,14 @@ static espeak_ERROR speak_text(struct sy
 	if (espeakup_mode == ESPEAKUP_MODE_SPEAKUP && (s->len == 1)) {
 		char *buf;
 		int n;
-		n = asprintf(&buf,
-			     "<say-as interpret-as=\"characters\">%c</say-as>",
-			     s->buf[0]);
+		const char *say_as;
+		if (s->buf[0] == ' ')
+			n = asprintf(&buf,
+				     "<say-as interpret-as=\"tts:char\">&#32;</say-as>");
+		else
+			n = asprintf(&buf,
+				     "<say-as interpret-as=\"characters\">%c</say-as>",
+				     s->buf[0]);
 		if (n == -1) {
 			/* D'oh.  Not much to do on allocation failure.
 			 * Perhaps espeak will happen to say the character */
_______________________________________________
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