本文介绍了C#如何输出Unicode字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将int值存储在列表中,我希望将其输出为Unicode字符,例如:

I have int values stored in a list, that I want to output as unicode characters, like this:

 //A List<int> named Kanji exists and has values
    Console.OutputEncoding = Encoding.Unicode;
    int i = 0;
    while (i < Kanji.Count)
    {
        Console.WriteLine((char)Kanji[i]);
        i++;
    }

但这只会返回?字符。我该怎么办?

But this only returns ? characters. What should I do? The int values themselves are fine, I tested them.

推荐答案

控制台可能未使用Unicode或日语编码,和/

The console is probably not using a Unicode or Japanese encoding, and/or the font used does not contain the required character glyphs.

请查看以及更多部分。

这篇关于C#如何输出Unicode字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 04:27