I
interec
Hi Folks,
I am writing a c++ program on redhat linux using main(int argc,
wchar_t *argv[]). $LANG on console is set to "en_US.UTF-8". g++
compiler version is 3.4.6.
Q1. what is the encoding of data that I get in argv[] ?
Q2. what is encoding of string constants defined in programs (for
example L"--count") ?
Q3. when I run the program as:
./a.out --count 1
Why does (wcscmp(argv[1], L"--count") == 0) always evaluate to
false?
What is the workaround. How do I make it evaluate to true?
Q4: when I do wstring
mystring = argv[1];
is mystring considered to be a UTF-8 string?
Q5: In case I use main(int argc, char** argv),
what is the encoding of characters in argv[] ?
Q6. What is the difference between main(int arc, wchar_t *argv[]) and
main(int argc, char *argv[]). Any document that describes this? My
compiler is gcc 3.4.6
Thanks
I am writing a c++ program on redhat linux using main(int argc,
wchar_t *argv[]). $LANG on console is set to "en_US.UTF-8". g++
compiler version is 3.4.6.
Q1. what is the encoding of data that I get in argv[] ?
Q2. what is encoding of string constants defined in programs (for
example L"--count") ?
Q3. when I run the program as:
./a.out --count 1
Why does (wcscmp(argv[1], L"--count") == 0) always evaluate to
false?
What is the workaround. How do I make it evaluate to true?
Q4: when I do wstring
mystring = argv[1];
is mystring considered to be a UTF-8 string?
Q5: In case I use main(int argc, char** argv),
what is the encoding of characters in argv[] ?
Q6. What is the difference between main(int arc, wchar_t *argv[]) and
main(int argc, char *argv[]). Any document that describes this? My
compiler is gcc 3.4.6
Thanks