Wingdings font: some characters are not displayed correctly

Posted on 2011-10-11
Medium Priority
Last Modified: 2012-06-21
I create a form with a label having font Wingdings, and programmatically set the text to ChrW(&H8B) . According to Charmap, 0x8B is zero in a black circle. However, on the form the symbol does not show up. The same happens with 0x8C, but then 8D shows up correctly, then 0x8E again does not... It's the same in Windows XP and Windows 7, in VB6 and VB.Net 2010. Why these characters don't work?
Question by:Vadim Rapp
  • 2
LVL 40

Accepted Solution

Jacques Bourgeois (James Burger) earned 2000 total points
ID: 36950362
Although the documentation tells that ChrW is the preferred way, I have found that for some fonts it does not work well. Use the standard Chr and it should work.
LVL 16

Expert Comment

ID: 36950425
When I try keying in values using the keypad (using <Alt> keystrokes), I'm getting different results than when using ChrW.  And I can't find any pattern to the mismatched character mapping.

However, Chr$ works just find.
LVL 40
ID: 36950547
According to the documentation, Chr takes the environment (Control Panel) into consideration, while ChrW goes straight to the Unicode value. The problem probably comes from there somewhere.
LVL 40

Author Closing Comment

by:Vadim Rapp
ID: 36951025
The problem in the real application was in taking the value from the SQL Server database (field nchar) via recordset, and putting it on MSDataReport, component of VB6. So the following code had this problem:

in SQL:
select myfield from mytable....
in VB:
report.section.control = recordset.field("myfield")

and it was resolved by this modification:

in SQL:
select unicode(myfield) from my table...
in VB:

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question