On Wed, Jan 7, 2009 at 9:34 PM, Olof Sjobergh <olofsj@...> wrote:
> I was having some trouble with utf8 chars in my Swedish dictionary for
> the Illume keyboard, so I took a look at the code and fixed the issue.
> I was also able to speed up the searching.
> As hinted by the FIXME on the function _e_kbd_dict_normalized_strcpy,
> this was not multibyte safe, which made words with multibyte chars
> As for the speedup, the _e_kbd_dict_normalized_strncmp did a lot of
> unnecessary conversions, so this should be faster (and equivalent, I
I made a mistake in the last patch, so here's a new one that should
work better. It fixes the problems i mentioned above, plus:
- E no longer segfaults on entering a € (euro sign) from the Numbers
keyboard. This would segfault since it is not in the normalisation
table and thus won't be normalised to a char < 128. To fix this we
just include a check if a normalised char is < 128 before looking for
- When entering long words (~25 chars) there was a segfault due to
alloca not allocating large enough memory, so use malloc instead
(though words probably won't be that large, it's bad to segfault on
- Fixes typo loolup -> lookup.