News for hackers. Stuff that matters.
Re:Unicode Utilities: Confusables by jancsika on Saturday August 20, 2022 @04:25PM (#32534919)
Too bad there isn't a standard lib that will flag any non-ASCII characters to be rendered big like those oversized sprites in the "giant" level of Super Mario 3.

So you scroll through source code and hit this weirdly spaced line with a big "h" character and go-- oh-- that's some buggy crap in there.

Then maybe have a map for ranges that you want to include in your allowable set, and we're all good to go. :)

Re:Unicode Utilities: Confusables by jabbany on Saturday August 20, 2022 @05:00PM (#32535111)
I think the rust compiler kind of does this: https://mobile.twitter.com/hmemcpy/status/115189096847766732...
Re:Unicode Utilities: Confusables by jeroenhd on Saturday August 20, 2022 @06:41PM (#32535793)
Re:Unicode Utilities: Confusables by estebank on Sunday August 21, 2022 @04:53AM (#32538446)
That's only the lexer check. We have further lints that run after parsing to detect Unicode confusables in identifiers as well, as well as two lints for text flow codepoints that can change what the code looks like in editors (one for comments and one for string literals).
Re:Unicode Utilities: Confusables by rurban on Wednesday August 24, 2022 @06:39AM (#32577517)
Yeah, but Rust does it properly by following UTS-39, and not blindly checking for just confusable matches.
Re:Unicode Utilities: Confusables by jancsika on Saturday August 20, 2022 @05:20PM (#32535217)
Ooh, good job, Rust!
Re:Unicode Utilities: Confusables by II2II on Saturday August 20, 2022 @05:46PM (#32535414)
Better yet, highlight characters out of context. Not everyone writes in languages that are fully representable in ASCII, yet confusable characters are still an issue.