Operating System - HP-UX
1748204 Members
3308 Online
108759 Solutions
New Discussion

Re: Problem in getting cmd line agruments on korean HPUX 11.11 machine

 
Dennis Handly
Acclaimed Contributor

Re: Problem in getting cmd line agruments on korean HPUX 11.11 machine

>wchat_t value should be vi

Yes, I guessed that. :-)
The value you are getting is that value. Your problem is that you need to convert that character encoding to java's.
srikanth.259
Occasional Advisor

Re: Problem in getting cmd line agruments on korean HPUX 11.11 machine

>> The value you are getting is that value.

No , i am not getting the expected value i.e the file name @ cmd line , its garbled

>>Your problem is that you need to convert that character encoding to java's.

if i convert the string to wchar_t , the iss ue will be solved i.e mbstowcs takes care pf conversion
Dennis Handly
Acclaimed Contributor

Re: Problem in getting cmd line agruments on korean HPUX 11.11 machine

>I am not getting the expected value i.e the file name @ cmd line, it's garbled

Please convert the correct name to hex and attach:
echo korean_filename | xd -tx1

>if i convert the string to wchar_t, the issue will be solved i.e mbstowcs takes care pf conversion

I printed the original hex string you provided, with %s and the wchar_t string with %ls and I got the same thing.
srikanth.259
Occasional Advisor

Re: Problem in getting cmd line agruments on korean HPUX 11.11 machine

output:
> echo à à ±à | xd -tx1
0000000 c7 d1 b1 db a
0000005
Dennis Handly
Acclaimed Contributor

Re: Problem in getting cmd line agruments on korean HPUX 11.11 machine

> echo à  à  à ±à  | xd -tx1
0000000 c7 d1 b1 db a

This indicates everything is working. You have the right command line and you have the right wchar_t string. But you may have the wrong codeset for windows.

That's assuming when you do a "ls à  à  à ±à " it finds the file.