Bug 562 – Source file without BOM starting with non-ASCII compiles and runs

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P4
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-11-18T10:56:00Z
Last change time
2014-02-15T13:21:25Z
Keywords
spec
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla
Blocks
511

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2006-11-18T10:56:11Z
Ä ä; class Ä { } void main() { } The above, encoded as UTF-8 without a BOM, compiles and runs just fine even though the spec claims that "[i]f the source file does not start with a BOM, then the first character must be less than or equal to U0000007F" which the "Ä" character is not. I'm not sure this is a useful limitation, and since it's not taken into account by DMD it might as well be removed, in my opinion.
Comment #1 by matti.niemenmaa+dbugzilla — 2006-12-03T03:57:16Z
DMD behaviour corrected in DMD 0.176.