Can't display multi byte string on MonoDevelop Mac OS X
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.
I made sure following things:
- The source code encoding is UTF-8
- I selected Japanese font set "Osaka Regular-Mono" (Preferences > General > Font)
- Executing the exe from a terminal, "あ" is displayed correctly on terminal window
- On Ubuntu's MonoDevelop, "あ" is displayed correctly in A开发者_开发百科pplication Output window
Environments:
- MonoDevelop 2.2.2
- Mono 2.6.4
- Mac OS X 10.6.3
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 supports setting a custom font for the output pads, so as a workaround you can set Okasa as the font for the output pads.
精彩评论