Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

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

 
Highlighted
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.
Highlighted
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
Highlighted
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.
Highlighted
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
Highlighted
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.