6

My application correctly handles different kind of character sets, but only internally - when it comes to displaying text in standard WinForms labels und textboxes, it seems to have problems with chinese characters.

The problem seems to be the font used (Tahoma), because when I copy&paste the text, or view it in the debugger, it is displayed correctly. Also when I set MS Mincho as the font to be used, the characters on the screen look OK.

Of course, I don't want to use MS Mincho in the entire application. Do I have to switch the font depending on the characters displayed, or is there a better way I have missed?

1
  • 3
    Make sure you don't use MS Mincho for Chinese. That is a Japanese font. You should use SimHei or SimSun for Simplified Chinese and MingLiU for Traditional Chinese. They are different, and a native will instantly spot the difference. And bzlm is right, there is something wrong with you forms, they should work out of the box even with Tahoma due to the font linking done by the system. Commented Nov 19, 2009 at 7:40

2 Answers 2

4

UniScribe, which was introduced in Windows 2000, is supposed to handle this transparently, meaning that it will automatically use a different font (such as Mincho) for characters that aren't present in the font you've selected. This is why it looks correct in the debugger, even though the font used in the debugger doesn't contain Chinese characters. Perhaps you are doing something that disables UniScribe, or is problematic in some other way. Perhaps if you could paste some code it would be easier to identify the problem.

Sign up to request clarification or add additional context in comments.

2 Comments

Seems like this is the kind of library I've been looking for.
@Stefan If you use the standard development mechanisms (ie. Visual Studio), UniScribe should already be there and do the work for you (see comment by Mihai on question).
0

All fonts don't have data for all the glyphs that can be expressed in unicode. You´ll have to locate a suitable font which has the subset you want.

edit: Just to clarify, there are fonts which cover the full unicode range, but the one you´re using now isn´t one of them.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.