aspose 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14144
    
  18

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
 
jQuery in Action, 2nd edition
 
subject: UTF16 characters not printed properly on console