File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes UTF16 characters not printed properly on console Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "UTF16 characters not printed properly on console" Watch "UTF16 characters not printed properly on console" New topic
Author

UTF16 characters not printed properly on console

jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi All,

I have generated UTf16 characters from native2ascii and trying to print that characters in specific language,this is for english. but its dosent give proper output.


it prints þÿServices and sqaure which is not proper .Please any one can guide me how can i achieve this.. I tried with eclipse console encoding as well.

Regards
Jatan
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12921
    
    3

You can only print characters that exist in the font that is being used. If your Windows command prompt uses a font that doesn't contain the characters you want to display, then you get question marks or empty squares instead of the characters. Besides that, I'm not sure if the Windows command prompt has other limitations so that those characters can't be displayed, even if you use a font that has them.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: UTF16 characters not printed properly on console
 
Similar Threads
strange problem writing UTF8
How to display russian data properly using S.O.P
Unicode character swallowing characters after it
unicode suport in eclipse
unicode value for char