wood burning stoves 2.0*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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

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.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

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
It is sorta covered in the JavaRanch Style Guide.
subject: UTF16 characters not printed properly on console
Similar Threads
unicode value for char
strange problem writing UTF8
Unicode character swallowing characters after it
unicode suport in eclipse
How to display russian data properly using S.O.P