Checker : different leading/trailing spaces does not detect inconsistent non-breaking spaces
Created by: Anonymous
Original issue 257 created by @ysavourel on 2012-07-25T23:53:13.000Z:
The summary says it all.
(Windows, m17)
== Explanation:
The current detection uses Character.isWhitespace
That method does not consider nbsp as whitespace (javadoc, also tested).
== Proposed fix:
I have tried isSpace, isSpaceChar, and isWhitespace for all char between 0 and FFFF.
isSpaceChar is the only one returning true for nbsp.
Change the test to do isWhitespace | isSpaceChar
The only characters that will give different results are:
0x00A0 NO-BREAK SPACE;Zs;0;CS; 0020
0x2007 FIGURE SPACE;Zs;0;WS; 0020
0x202F NARROW NO-BREAK SPACE;Zs;0;CS; 0020
I think it is safe to change.
== I will fix it if you "Accept" it