(no subject)

new to d no at mail.com
Sun Jun 6 06:35:42 PDT 2010


new to d Wrote:

> Robert Clipsham Wrote:
> 
> > On 06/06/10 14:00, new to d wrote:
> > > It's a typical hello world program:
> > >
> > > import std.stdio;
> > >
> > > void main(string[] args) { writeln("Hello world!"); }
> > >
> > > I also tried using printf instead of writeln. I'm compiling it with
> > > dmd test.d. I'm using dmd v2.046. I'm compiling the c program with
> > > gcc -otest2 test2.c.
> > 
> > And how are you interfacing each app with cgi? There could be some 
> > subtle difference there which is doing it, that app on its own looks 
> > fine and works here.
> 
> It works now after i added 
> 
> writeln("Content-Type: text/plain;charset=us-ascii\n\n");
> 
> I didn't know this is required, i have never used CGI before. I copied c example from some cgi tutorial and forgot to include that line in the D program. I'm sorry for wasting your time.

And I guess this should really be writeln("Content-Type: text/plain;charset=utf-8\n\n") for D.


More information about the Digitalmars-d-learn mailing list