为什么'?'在java中打印unicode字符时显示为输出 [英] why '?' appears as output while Printing unicode characters in java

查看:162
本文介绍了为什么'?'在java中打印unicode字符时显示为输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在java中打印某些unicode字符时,输出为?。为什么会这样,有没有办法打印这些字符?

While printing certain unicode characters in java we get output as '?'. Why is it so and is there any way to print these characters?

这是我的代码

String symbol1="\u200d";
        StringBuilder strg = new StringBuilder("unicodecharacter");
        strg.insert(5,symbol1);
        System.out.println("After insertion...");
        System.out.println(strg.toString());

输出为
插入后...
unico?decharacter

Output is After insertion... unico?decharacter

推荐答案

这里是由Joel Spolsky撰写的关于该主题的精彩文章。它不会直接帮助您解决问题,但它可以帮助您了解正在发生的事情。它还将向您展示情况的真实情况。

Here's a great article, written by Joel Spolsky, on the topic. It won't directly help you solve your problem, but it will help you understand what's going on. It'll also show you how involved the situation really is.

这篇关于为什么'?'在java中打印unicode字符时显示为输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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