[Nickname] Fix nickname digit check
Previously we use IsAsciiDigit(char) to check whether nickname is valid. In i18n languages, the language scripts/alphabet are encoded in Unicode. IsAsciiDigit will mistakenly treat some i18n language scripts as digits because Ascii is encoded in 7 bits and meant for English only, while UTF-8 is encoded in minimum 8 bits. The influence of previous implementation is for some of the i18n user, we won't show nickname even if the nickname is valid (same as control group user, won't affect user experience). We use IsAsciiDigit(char16) instead, to check whether nickname contains digits. Bug: 1082013 Change-Id: I08dc77047d46225aa2f4645554e0443a800a480d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216888 Commit-Queue: Sujie Zhu <sujiezhu@google.com> Reviewed-by:Dominic Battré <battre@chromium.org> Reviewed-by:
Jared Saul <jsaul@google.com> Cr-Commit-Position: refs/heads/master@{#772379}
Showing
Please register or sign in to comment