Dear all,
I am writing an application where I need to receive text in a
different character set than the normal ascii.
I am supposed to receive string in hebrew and make some computation on
that based on the unicode values of each character.
I was trying some basic code to see how it works but I can't get the
output that I expect. For example:
System.out.println("character value:"+ (int)args[0].charAt(0));
The value in args[0] is a hebrew letter, which should have the Unicode
value between 05D0 and 05FF. However, any value that I give as an
input always returns 63 (the code for the '?').
Can anyone help me?
Kind regards,
F.
Oliver Wong - 20 Mar 2007 22:27 GMT
> Dear all,
>
[quoted text clipped - 13 lines]
>
> Can anyone help me?
Try output to a file instead of standard out. Your console may not be
able to display certain characters, whereas you can always use a
hex-editor to analyze the contents of a file.
- Oliver
Joshua Cranmer - 20 Mar 2007 22:35 GMT
> Dear all,
>
[quoted text clipped - 16 lines]
> Kind regards,
> F.
What is happening is that the terminal is probably not recognizing the
Hebrew letter when it is inputted. One way to test is to run from
another Java class:
Runtime.getRuntime().exec("java someClass \u05d0");
If that works, it's your terminal that is having the problem.