Mono WinForms and Unicode characters

2019-08-28 22:45发布

问题:

I am working on a VS2010 C# application that allows users to input data in *English as well as in Hindi (Unicode).

The application is working well in Windows, but in Linux (with Mono-2.10.8), instead of displaying Unicode characters it show boxes.

mono unicode problem http://img534.imageshack.us/img534/1395/vry.png

I have tried to run it on Debian Wheezy Stable and Ubuntu LTS 12.04. I have also tried to compile it with MonoDevelop; still no luck.

Is there any workaround to fix it?

回答1:

Boxes like this is usually a sign that the codepoints displayed are not present in the font currently used. Did you make sure you were using a font with Hindi characters?



回答2:

I found the solution that i want to share with the community.

The problem was with local. I set environment var LANG to hi_IN.utf-8 and it resolved the issue.



回答3:

I also had a similar issue with Japanese. I fixed my issue by changing LANG=ja_JP.utf-8.