无法打印印地文字符 [英] Can't print hindi characters

查看:84
本文介绍了无法打印印地文字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

公共课程演示{

    public static void main(String[] args) {
        for(int k = 2029; k<=2360 ; k++)
        {
            System.out.print(k+  " "+(char)k+" ");
        }

    }

}

输出

2029? 2030年? 2031年? 2032年? 2033年? 2034年? 2035年? 2036年? 2037年? 2038年? 2039年? 2040年? 2041年? 2042年? 2043年? 2044年? 2045年? 2046年? 2047年? 2048年? 2049年? 2050年? 2051年? 2052年? 2053年? 2054年? 2055年? 2056年? 2057年? 2058年? 2059年? 2060年? 2061年? 2062年? 2063年? 2064年? 2065年? 2066年? 2067年? 2068年? 2069年? 2070年?依此类推..
此输出显示在cmd ...
为什么它不显示印地文字符....

2029 ? 2030 ? 2031 ? 2032 ? 2033 ? 2034 ? 2035 ? 2036 ? 2037 ? 2038 ? 2039 ? 2040 ? 2041 ? 2042 ? 2043 ? 2044 ? 2045 ? 2046 ? 2047 ? 2048 ? 2049 ? 2050 ? 2051 ? 2052 ? 2053 ? 2054 ? 2055 ? 2056 ? 2057 ? 2058 ? 2059 ? 2060 ? 2061 ? 2062 ? 2063 ? 2064 ? 2065 ? 2066 ? 2067 ? 2068 ? 2069 ? 2070 ? and so on... this output shows on cmd ... why it not show hindi character ....

推荐答案

在Eclipse中:

您需要将Eclipse控制台编码更改为UTF-8。为此,请转到运行配置对话框,然后选择常用标签。在编码下,选择 UTF-8 。现在运行你的程序。您应该在Eclipse控制台中看到打印的印地文字符。

You need to change your Eclipse Console encoding to UTF-8. To do so, go into your Run Configuration dialog and select the Common tab. Under Encoding, choose UTF-8. Now run your program. You should see hindi characters printed in the Eclipse console.

这篇关于无法打印印地文字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆