How to display Japanese characters in a C# GUI label
I'm designing a flash card program in C#, and I have japanese characters in an SQL compact database entered using IME. The characters show up fine in the database, however when I pull them out of the database to display in a label, I get the standard 'don't know what to display' box characters.
I'm pulling the data out of the database and casting it as a string. I'm sure there is a simple fix for this but I开发者_开发知识库've searched and haven't stumbled on the answer yet. Do I need to change an encoding option somewhere in my project. I'm using visual studio if that helps.
Edit: Winforms, I apologize for being vague.
There is a simple fix: download a font that supports Japanese characters, install it on your PC, and then set that font as the font for whatever control you're using to display the text.
Note that when deploying your software to other machines, you'll have to make sure that you also deploy this font.
精彩评论