I have a text - "¸ÁévÀAvÀæöå ºÉÆÃgÁlzÀ°è «zÁåyðUÀ¼ÀÆ ¥Á¯ÉÆÎArzÀÝgÀÄ."
, which I copied from a web page which had UTF-8 encoding.
There is this website ASCII2UNICODE in which I copy-paste the text above and after converting I get - "ಸ್ವಾತಂತ್ರ್ಯ ಹೋರಾಟದಲ್ಲಿ ವಿದ್ಯಾರ್ಥಿಗಳೂ ಪಾಲ್ಗೊಂಡಿದ್ದರು."
which is perfectly correct.
How can I do this in Java?
I have tried :
System.out.println(new String("¸ÁévÀAvÀæöå ºÉÆÃgÁlzÀ°è «zÁåyðUÀ¼ÀÆ ¥Á¯ÉÆÎArzÀÝgÀÄ.".getBytes("ASCII"), "UTF-8"));
System.out.println(new String("¸ÁévÀAvÀæöå ºÉÆÃgÁlzÀ°è «zÁåyðUÀ¼ÀÆ ¥Á¯ÉÆÎArzÀÝgÀÄ.".getBytes("UTF-8"), "ASCII"));
Now I am really not sure whether the source text is ASCII or UTF-8.