aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-04-01 15:23:24 +0900
committerJean Chalard <jchalard@google.com>2013-04-01 17:06:19 +0900
commita411595b169c1f136d09d114a458def1f99f91d9 (patch)
treedccc5927d38eadfbf8f6b5ba588c022a8873b62d /java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
parent48d8d8d0ae573605f938b3859bf58e1972f0d737 (diff)
downloadlatinime-a411595b169c1f136d09d114a458def1f99f91d9.tar.gz
latinime-a411595b169c1f136d09d114a458def1f99f91d9.tar.xz
latinime-a411595b169c1f136d09d114a458def1f99f91d9.zip
Fix two nasty bugs with surrogate pairs.
The important bug is in findWordInTree. The problem, which is not obvious, is that we were calling codePointAt() with the code point index in the string, instead of the char index. The other bug this change fixes was harmless in the practice, because it's in the iteration which is only used for debug and pretty printing purposes. It's very similar in that it would substract a length in code point to a length in chars and truncate a StringBuilder at that length, so it would fail in a quite similar manner. This changes the meaning of the "length" attribute in Position, but it's clearer this way anyway. Bug: 8450145 Change-Id: If396f883a9e6449de39351553ba83f5be5bd30f0
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java')
0 files changed, 0 insertions, 0 deletions