December 17, 2004
import std.stdio;
int main(char[][] args)
{
   writefln("%d args:", args.length);
   foreach(char[] arg; args)
   {
      writefln("\t%s", arg);
   }
   return 0;
}

I compile it to test.exe and do this on the command line:
C:\>test foo bår
3 args:
   C:\test.exe
   foo
   bError: invalid UTF-8 sequence

Note: Windows 9x/Me/NT support GetCommandLineW() so it could be used with std.utf.toUTF8().