Bug 1166 – DMD doesn't support UTF encoded response files
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-04-19T21:38:14Z
Last change time
2019-07-13T11:10:55Z
Assigned to
No Owner
Creator
Julio César Carrascal
Comments
Comment #0 by jcarrascal — 2007-04-19T21:38:14Z
If an utf-* encoded file is used as a response file the compiler responds with an error:
C:\dmd>type test.rsp
´╗┐test.d
C:\dmd>type test.d
void main()
{
}
C:\dmd>dmd @test.rsp
´╗┐test.d: module ´╗┐test cannot read file '´╗┐test.d'
Comment #1 by smjg — 2007-09-29T08:19:34Z
Those characters are the UTF-8 BOM, misinterpreted in code page 850 or similar. So the problem isn't so much that the .rsp is UTF encoded as the presence of a BOM that's throwing it.
Comment #2 by jcarrascal — 2007-09-29T10:00:16Z
No, actually any non ASCII character will show you the same error:
C:\dmd>type césar.rsp
c├®sar.d
C:\dmd>dmd @césar.rsp
c├®sar.d: module c├®sar cannot read file 'c├®sar.d'
Comment #3 by razvan.nitu1305 — 2019-07-13T11:10:55Z
Compiling the code in the .rsp file now yields:
onlineapp.d: Error: module `onlineapp` source file must start with BOM or ASCII character, not \xC2
Closing as fixed.