Skip to content

Disallow additional invisible characters in Julia source #49850

Open
@c42f

Description

@c42f

There's many invisible unicode characters.

https://invisible-characters.com/

We currently disallow several of them

(error (string "invisible character \\u" (number->string (fixnum c) 16) " near column " (+ 1 cn)))

Namely

'\u00ad' # soft hyphen
'\u200b' # zero width space
'\u200c' # zero width non-joiner
'\u200d' # zero width joiner
'\u200e' # left-to-right mark
'\u200f' # right-to-left mark
'\u2060' # word joiner
'\u2061' # function application

It appears the reference parser also attempts to disallow '\u115f' # Hangul Choseong filler , but this doesn't work due to Base.is_id_char returning true for that character. I'm not sure this is a problem, I didn't find obvious information about what this filler character is for and whether it might be required for writing identifiers in Korean.

Anyway, should we disallow more of the list from https://invisible-characters.com/ ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    parserLanguage parsing and surface syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions