On Aug 7, 6:13 pm, "Samant.Tru...@gmail.com" <Samant.Tru...@gmail.com>
wrote:
Does main function support unicode?
int main( int argc, char** argv ) can I say int mainw( int argc,
wchar_t** argv )?
With regards to the function signature, no. Beyond that, any
Unicode support (including in wchar_t) is currently
implementation defined. The implementations I use allow Unicode
(UTF-8) in the argv strings, but don't require it. (The real
issue, of course, is where argv comes from. Unix, for example,
allows everything but a '\0' character in each argv argument,
just copying whatever it is given by the program which invoked
your program. Windows is a bit more complicated, but I think it
will work the same regardless of whether you pass UTF-8, 8859-1,
or some other ASCII based encoding---I *think* that it only
treats tab (0x09), space (0x20) and quotes (0x22) specially.)
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34