在C#中显示Unicode文本 [英] Displaying a unicode text in C#
问题描述
我的应用程序在文本框和LinkLabel上显示英文,日文和中文字符. 目前,我检查是否存在Unicode字符,并将字体更改为MS Mincho或将其保留在Tahoma中.
My App displays English, Japanese and Chinese characters on a TextBox and a LinkLabel. Currently, I check if there are unicode characters and change the font to MS Mincho or else leave it in Tahoma.
现在,MS Mincho可以正确显示日语,但是对于中文,我必须使用SimSun.我该如何区分两者?
Now MS Mincho displays Japanese properly, but for Chinese I have to use Sim Sun. How can I distinguish between the two?
无论字体/语言如何,我如何确保unicode文本正确显示?
How can I ensure that unicode text are displayed properly regardless of the font/language?
推荐答案
如果每个文本都有unicode字符,则使用支持unicode的字体应该可以为您正确覆盖(例如Arial Unicode MS).
If you have unicode characters for each of the text, using a font that supports unicode should cover it properly for you (e.g. Arial Unicode MS).
这篇关于在C#中显示Unicode文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!