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

Samuel Thibault samuel.thibault at ens-lyon.org
Sat Mar 11 04:43:08 EST 2017


Hello,

Zahari Yurukov, on sam. 11 mars 2017 04:11:30 +0200, wrote:
> I found what causes the other two problems - with spelling words in cyrillic and reading individual cyrillic characters (I'll quote my previous findings at the end of this letter, in case you've missed my previous letter).

I indeed didn't receive it, and I can't find it in the mailing list
archive.

> ch = inverse_translate(vc, c, 0);
> 
> The function inverse_translate is defined in include/linux/consolemap.h:
> u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode);

Oops, indeed.  Will fix that.

> In main.c, line 435, in function speak_char:
> if (direct && direct->u.n.value)
> 
> If the character is cyrillic (or probably any other character from the non-ascii range), it doesn't pass this check,

I don't think it's related to being non-ascii. Do you have 1 in
/sys/accessibility/speakup/soft/direct
? If not, put 1 there, so it's espeak which will do the spelling. On the
long run, I don't think we want to include in the kernel the spellling
of each and every unicode character, so it's probably better to just
have users use the direct mode.  William, what do you think?  I'd say
softsynth should default to enabling direct mode by itself, shouldn't
it?

> and then follows:
> if (ch >= 0x100)
>     return;
> 
> So nothing unicode ever gets out.

Yes, as mentioned above the kernel does not support unicode spelling by
itself.

> About the spelling:
> In main.c, around line 723, in spell_word, where it says "fixme",

Here, the "fixme" is actually about supporting direct mode.

> the following continue statement probably causes an infinite loop,

Oops.

> which causes the freeze that I experianced (if I replace it with a brake statement - there's no freeze).

Could you try to just add cp++; before the continue;?

> I use speakup exclusively all day today and haven't spotted other problems.

Cool :)

> Follows a copy of my previous message about speakup not reading cyrillic (and probably any unicode characters) with the review commands (or any other action, except when the screen is updated).

Normally, only the spelling without enabling direct mode does not work
yet, and:

> I also found, that inverse_translate is called in selection.c, line 31/32, too.

Indeed, selection still needs some work, because when pasting it has to
feed the console properly: either utf-8 or the proper 8bit encoding.

Thanks for the feedback!
Samuel


More information about the Speakup mailing list