https://github.com/dlang/dmd/blob/master/compiler/src/dmd/lexer.d#L578 Basically its in multi-byte UTF-8 character, checks if its in the non-ASCII character ranges. No special handling of new lines is provided, but probably should be.