NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Questions related to EJS => Topic started by: ahmedelshfie on July 03, 2010, 10:15:22 am



Title: native2ascii
Post by: ahmedelshfie on July 03, 2010, 10:15:22 am
I find file native2ascii  in my system under program files/java/jdk6/bin
I'm not sure if this is file that you mean prof or no but i think problem is in special characters like you said me
I will insert images for my system java in my PC and i mark file by red line for you check if right or wrong and need
Download and I'm search about Utf-8 in java but not found.



Title: Re: native2ascii
Post by: Fu-Kwun Hwang on July 03, 2010, 11:43:53 am
I can type in αβγ directly with copy and paste to EJS as property value.
And the compiled file also work fine.

For your case, it might due to character code which is not implemented in your local language code.
It might be solved by using  native2ascii  to conver your local language code to utf-8

For me: the language code is big5
I type in αβγ into test.txt and I use the following to convert it into utf-8 code:

native2ascii -encoding big5 test.txt test_utf8.txt

And the result in test_utf8.txt is
Code:
\u03b1\u03b2\u03b3

And I put the above code into property field for label, it also shown as "αβγ" in EJS working window.
However, it is not working with compiled simulation.

I think the problem is related to local language issue (with java). You need to ask help from local java programmer in your country.


Title: Re: native2ascii
Post by: ahmedelshfie on July 08, 2010, 01:42:33 am
Problem is solved by my self  :D
I download native2ascii  and replace in my java system
After restor PC and test again typing symbols i test typing by way Greek symbol is phi (φ)
And work very well now I'm typing all symbols without any problem.
Thanks for help


Title: Re: native2ascii
Post by: Fu-Kwun Hwang on July 08, 2010, 07:32:45 am
t is good to know that the above method work.