Bug 430 – incorrect UTF-8 detection for drafted UTF-16/32 source files

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-10-12T13:51:00Z
Last change time
2014-02-15T13:22:04Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
thomas-dloop

Comments

Comment #0 by thomas-dloop — 2006-10-12T13:51:44Z
The current encoding detection for files without BOMs(module.c:490-522) is broken for drafted cases. ---sample.d--- T x; alias int T; -------------- If T is replaced by a character >= 0x100 and if the file is saved as UTF-16-BE, UTF-16-LE, UTF-32-BE or UTF-32-LE (all without BOM), DMD-0.169 will erroneously treat the file as UTF-8.
Comment #1 by bugzilla — 2006-10-18T13:30:40Z
Fixed DMD 0.170 (changed specification)