问题描述
问题在于以下一行代码:
The problem is following one line code:
Console.WriteLine ("あ");
这将在应用程序输出"窗口中产生以下输出:
This results in the following output in Application Output window:
?
如何显示あ"而不是?"在应用程序输出"窗口中.
How can I display "あ" instead of "?" in Application Output window.
我确定以下几点:
- 源代码编码为UTF-8
- 我选择了日语字体集"Osaka Regular-Mono"(首选项">常规">字体")
- 从终端执行exe,在终端窗口上正确显示あ"
- 在Ubuntu的MonoDevelop上,あ"在应用程序输出"窗口中正确显示
环境:
- MonoDevelop 2.2.2
- 单声道2.6.4
- Mac OS X 10.6.3
推荐答案
问题是MonoDevelop用于字体渲染的Pango库的Mac版本目前不支持缺少字形的字体后备.通常,如果字体中没有日语字符,则渲染器应从默认的日语字体退回到字形.
The problem is the Mac version of the Pango library that MonoDevelop uses for font rendering doesn't currently support font fallbacks for missing glyphs. Usually, if the Japanese characters are not available in a font, the renderer should fall back to the glyph from the default Japanese font.
MonoDevelop 2.4 Beta 1支持为输出面板设置自定义字体,因此,可以将Okasa设置为输出面板的字体.
MonoDevelop 2.4 Beta 1 supports setting a custom font for the output pads, so as a workaround you can set Okasa as the font for the output pads.
这篇关于无法在MonoDevelop Mac OS X上显示多字节字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!