José Morgado
José Morgado

Reputation: 41

Mono fails rendering Chinese text in WindowsForms Textbox

I need some Chinese in a form, but running in Linux with Mono it fails. Any tips? Example:

// works OK in windows and Linux same text.
Console.WriteLine( "Test  中国 的" );

// works OK in windows fails in Linux (renders "Test  [][][][]")
MessageBox.Show("Test  中国 的");

// works OK in windows fails in Linux (renders "Test  [][][][]")
Textbox1.Text="Test  中国 的"

Upvotes: 4

Views: 390

Answers (1)

Kyle the anime guy
Kyle the anime guy

Reputation: 39

First, make sure that you have a font set that contains Chinese characters. Then try setting environment var LANG to zh_CN.utf-8 and see if that solves the problem.

Upvotes: 2

Related Questions