Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

Dealing with Unicode

Thread view: 
F - 20 Mar 2007 22:04 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.