[Issue 13512] dmd cannot compile perfectly valid code with shebang
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Sep 21 04:59:56 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13512
--- Comment #6 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> ---
(In reply to Ketmar Dark from comment #4)
> i'm not also expecting correct EBCDIC decoding. but it's not UTF-16 file,
> and ahering the standard is easy in this case: just stop validating things
> that should not be validated.
AFAIK, the standard text encoding on posix today is utf-8, so D adheres to this
standard.
> i.e. either kill shebang feature entirely or do it right.
Shebang is sort of brittle by design. It works only for text files (which
doesn't always hold) and if the text file encoding matches that of your system.
If both conditions don't hold, you should find another way, like finding
executable by file extension - that works independently of file content.
--
More information about the Digitalmars-d-bugs
mailing list