Repository navigation
fix(ime_pinyin): fix letter count wrong when using some dictionary - #6752
Conversation
liamHowatt
left a comment
There was a problem hiding this comment.
Interesting! Letters with no phrases have an empty string entry as a placeholder to bridge the next letter. I confirmed that "h..." phrases don't work if the "i" placeholder is removed, and your fix works.
I tested in a debugger to see if there are any consequences for leaving parts of py_num and py_pos as the initial zero value and it looks totally fine.
Thank you!
Are you able to confirm if this part is correct? A dictionary will never have i, u, or v?
if(*py_str == '\0') return NULL;
if(*py_str == 'i') return NULL;
if(*py_str == 'u') return NULL;
if(*py_str == 'v') return NULL;
if(*py_str == ' ') return NULL;
These part are right. In fact, there are no Chinese characters starting with 'i', 'u' or 'v'. |
|
Thank you! 😊 |
When I'm using custom dictionary, I noticed some letter just can't match anything. I check the built-in dictionary and found



and my dictionary
the algorithm is depends on the next letter, so I got this:
and I can't type all word start with 'h'.
The Documentation was not mentioned about this, so maybe use the real letter to calculate index is a better way?
Notes
lv_conf_template.hrun lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py(astyle v3.4.12needs to installed by runningcd scripts; ./install_astyle.sh) and follow the Code Conventions.