Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 31,675 of 33,346    |
|    Martin B. to Alf P. Steinbach    |
|    Re: Wide character command line    |
|    15 Nov 11 11:44:59    |
      From: 0xCDCDCDCD@gmx.at              On 14.11.2011 02:50, Alf P. Steinbach wrote:       > On 13.11.2011 18:05, Arijit wrote:       >>       >> I am writing a program which accepts unicode arguments on the command       >> line. However there does not seem to be any way to access wide       >> character command line arguments in standard c++. No support for int       >> main(int argc, wchar_t **argv). Is there any way I can access an       >> unicode command line in standard c++ ?       >       > No.       >       > Not if you mean "using only the standard library".       >       > In short, it is not possible to write a 100% standard C++ program that       > uses only the standard library, where the Windows user (Windows: the       > most used OS) can specify an arbitrary filename directly in the       > invocation command, and have that filename successfully used (SNAFU).       >       > This is similar to how it is impossible, with the same constraints, to       > write a Windows `echo` in C++ (SNAFU), -- or to write a Windows       > program that copies standard input exactly to standard output like *nix       > `cat` (SNAFU).       >       > This list of very basic things that you can't do in standard C++ has a       > high silliness factor, like something out of Monthy Python, and as such       > it's quite embarrassing, or as I see it *should* be so embarrassing that       > the responsible people should be going around with very red faces all       > the time, (...)              Amen! But: Let us not forget that "the commandline" is a second-class       citizen on Windows and more importantly, the standard commandline       "cmd.exe" has to carry a bag of compatibility treats from way back to       the stone age.              I'm wondering if it is actually possible to set up "cmd.exe" in a       nonstandard way (code page, font, etc.) so that stuff could work for       standard C++.              cheers,       Martin              --       I'm here to learn, you know.       Just waiting for someone,       to jump from the shadows,       telling me why I'm wrong.                      [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca