Parse escaped sequence strictly in CSV parser
This change alters the CSV parser behavior. The parser only resolves * String resource reference. ["@string/res" -> "<content_of_res>"] * Other occurrence of escape sequence will be intact. ["\x" -> "\x"] Before this change, escape sequence in moreKeys string is parsed three times. At first in parsing string resource, next in CSV parser, and at last in KeySpecParser. So that representing single escape character itself is a bit annoying, "\\\\\\\\". Now we can represent single escape character itself in string resource by "\\\\". Change-Id: Ib978e17b779cc82585eed8241ac3857508b14bc7
Showing
- java/res/values/donottranslate-more-keys.xml 1 addition, 1 deletionjava/res/values/donottranslate-more-keys.xml
- java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java 11 additions, 43 deletions.../android/inputmethod/keyboard/internal/KeySpecParser.java
- tests/res/values/donottranslate.xml 3 additions, 0 deletionstests/res/values/donottranslate.xml
- tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserCsvTests.java 75 additions, 47 deletions.../inputmethod/keyboard/internal/KeySpecParserCsvTests.java
Please register or sign in to comment