Adding one more test case.
Adding more docs.
https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/unicode... File icu4c/source/i18n/unicode/uspoof.h (right): https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/unicode... icu4c/source/i18n/unicode/uspoof.h:498: USPOOF_COMBINING_DOT = 256, Updated name & description to USPOOF_HIDDEN_OVERLAY https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/uspoof_... File icu4c/source/i18n/uspoof_impl.cpp (right): https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/uspoof_... icu4c/source/i18n/uspoof_impl.cpp:387: sawLeadCharacter = isIllegalCombiningDotLeadCharacter(cp); Need to distinguish between non-combining characters and combining characters. Combining characters (other than 307) will come through here, and should not reset sawLeadCharacter. Any non-combining character should reset it. https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/uspoof_... File icu4c/source/i18n/uspoof_impl.h (right): https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/uspoof_... icu4c/source/i18n/uspoof_impl.h:87: bool isIllegalCombiningDotLeadCharacter(UChar32 cp) const; Do we want to change the implementation names to better match the new API name? https://codereview.appspot.com/339590043/diff/40001/icu4c/source/test/intltes... File icu4c/source/test/intltest/itspoof.cpp (right): https://codereview.appspot.com/339590043/diff/40001/icu4c/source/test/intltes... icu4c/source/test/intltest/itspoof.cpp:739: {false, u"\u0307\u0307"}, Add test cases true, u"i\u0301\u0302\u0307" false, u"iz\u0307" https://codereview.appspot.com/339590043/diff/40001/icu4j/main/classes/core/s... File icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java (right): https://codereview.appspot.com/339590043/diff/40001/icu4j/main/classes/core/s... icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java:456: public static final int COMBINING_DOT = 256; rename USPOOF_HIDDEN_OVERLAY
Replying to Andy code review feedback
Updating Java name and documentation
Adding Java implementation.
https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/unicode... File icu4c/source/i18n/unicode/uspoof.h (right): https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/unicode... icu4c/source/i18n/unicode/uspoof.h:498: USPOOF_COMBINING_DOT = 256, On 2018/05/10 21:56:35, andy.heninger wrote: > Updated name & description to USPOOF_HIDDEN_OVERLAY Done. https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/uspoof_... File icu4c/source/i18n/uspoof_impl.cpp (right): https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/uspoof_... icu4c/source/i18n/uspoof_impl.cpp:387: sawLeadCharacter = isIllegalCombiningDotLeadCharacter(cp); On 2018/05/10 21:56:35, andy.heninger wrote: > Need to distinguish between non-combining characters and combining characters. > Combining characters (other than 307) will come through here, and should not > reset sawLeadCharacter. Any non-combining character should reset it. Done as suggested by Markus. https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/uspoof_... File icu4c/source/i18n/uspoof_impl.h (right): https://codereview.appspot.com/339590043/diff/40001/icu4c/source/i18n/uspoof_... icu4c/source/i18n/uspoof_impl.h:87: bool isIllegalCombiningDotLeadCharacter(UChar32 cp) const; On 2018/05/10 21:56:36, andy.heninger wrote: > Do we want to change the implementation names to better match the new API name? It makes sense to change the first of these two methods. The second one is fine as-is because it is specific to combining dots. https://codereview.appspot.com/339590043/diff/40001/icu4c/source/test/intltes... File icu4c/source/test/intltest/itspoof.cpp (right): https://codereview.appspot.com/339590043/diff/40001/icu4c/source/test/intltes... icu4c/source/test/intltest/itspoof.cpp:739: {false, u"\u0307\u0307"}, On 2018/05/10 21:56:36, andy.heninger wrote: > Add test cases > true, u"i\u0301\u0302\u0307" > false, u"iz\u0307" Done, with changes to reflect Markus's suggestion. https://codereview.appspot.com/339590043/diff/40001/icu4j/main/classes/core/s... File icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java (right): https://codereview.appspot.com/339590043/diff/40001/icu4j/main/classes/core/s... icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java:456: public static final int COMBINING_DOT = 256; On 2018/05/10 21:56:37, andy.heninger wrote: > rename USPOOF_HIDDEN_OVERLAY Done.
LGTM