www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to compile a file in UTF-8 (with signature) format? - utf8-hello.d

reply marciof <marciof_member pathlink.com> writes:
Hi all,

When I try to compile the anexed file, which is in UTF-8 (with BOM signature)
format I get this error:

"utf8-hello.d: module utf8-hello has non-identifier characters in filename, use
module declaration instead"

Isn't the D compiler supposed to handle UTF formats?

Thanks,

--
Marcio Faustino
begin 0644 utf8-hello.d
M[[N_:6UP;W)T('-T9"YS=&1I;SL-" T*:6YT(&UA:6XH8VAA<EM=6UT 87)G


`
end
Jan 17 2006
parent reply Oskar Linde <oskar.lindeREM OVEgmail.com> writes:
marciof wrote:
 Hi all,
 
 When I try to compile the anexed file, which is in UTF-8 (with BOM signature)
 format I get this error:
 
 "utf8-hello.d: module utf8-hello has non-identifier characters in filename, use
 module declaration instead"
 
 Isn't the D compiler supposed to handle UTF formats?
This has nothing to do with the file being UTF-8. Rename the file utf8_hello.d or add a module utf8_hello; at the beginning of the file. By default, D sets the module name to the same as the file name. Module names may not contain dashes. /Oskar
Jan 17 2006
parent marciof <marciof_member pathlink.com> writes:
In article <dqih1n$11ni$1 digitaldaemon.com>, Oskar Linde says...
This has nothing to do with the file being UTF-8. Rename the file 
utf8_hello.d or add a module utf8_hello; at the beginning of the file.

By default, D sets the module name to the same as the file name. Module 
names may not contain dashes.

/Oskar
Thanks and sorry for my silly question :-)
Jan 17 2006