我只是试图在
eclipse中使用
java显示一些unicode象棋符号,但是它只是打印出随机矩形,除非棋子最近在样式上有了根本性的改变 – 我不认为它是我想要的.非常感谢帮助!
@H_502_2@我的代码:
import java.io.PrintStream; import java.io.UnsupportedEncodingException; public class ChessSymbols { public static void main (String [ ] args)throws UnsupportedEncodingException { String unicodeMessage = "\u2654 " + // white king "\u2655 " + // white queen "\u2656 " + // white rook "\u2657 " + // white bishop "\u2658 " + // white knight "\u2659 " + // white pawn "\n" + "\u265A " + // black king "\u265B " + // black queen "\u265C " + // black rook "\u265D " + // black bishop "\u265E " + // black knight "\u265F " + // black pawn "\n" ; PrintStream out = new PrintStream (System.out,true,"UTF8" ); out.println(unicodeMessage); } }