Solved

chracter set question easy but urgent

Posted on 2007-03-30
5
375 Views
Last Modified: 2008-02-01
The following code works fine. Easy question to someone with experience: what is the ü ? I don't understand how to work these character maps. The  ü is actually a checkmark when you run the program. How do I program other characters in that set?

Code:

WxPanel1->Connect( ID_WXPANEL1, wxEVT_PAINT, wxCommandEventHandler(MVMFrm::PanelPainterX) );

void MVMFrm::PanelPainterX(wxCommandEvent& event)
{
        // Function to paint a wxWindow
    wxPaintDC TempDC(this);
    TempDC.SetFont(wxFont(18,wxFONTFAMILY_DECORATIVE,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,wxT("Wingdings")));
    TempDC.SetTextForeground(wxColour(0, 200, 0));
    TempDC.DrawText(wxT("ü"),100,150);

    event.Skip();
}

Thanks
0
Comment
Question by:Wanderinglazyeye
5 Comments
 
LVL 28

Assisted Solution

by:pepr
pepr earned 50 total points
ID: 18827752
I guess you could do one of the two things wrongly.

Firstly, your source code was prepared by the editor that is not Unicode enabled and you actually do not have checkmark in your source, but the u with umlaut.

Secondly, you have compiled the source as "normal" application and not as Unicode application.

Also, your compiler have to know what encoding is used for creating the sources. Otherwise, it is not able to interpret your literal wxT("ü") correctly (if Unicode is enabled, it becomes L"ü" -- stlill compiler has to know what character was written down). If the compiler is capable to process the source file, then probably the best way is to store the source code in UFT-8 format with BOM (i.e. the Byte Order Mark -- the special sequence that can be stored at the beginning of a UTF-8 files).

Try some hexview tool or some Unicode capable external editor (like jEdit, www.jedit.org) to look what is really stored in the source.
0
 

Author Comment

by:Wanderinglazyeye
ID: 18827796
Hmmm. My question is really basic. Is the U with the umlaut part of a character map that corresponds to a graphic? When my widgets app compiles, I se a checkmark, which is fine. But I want to use a different symbol in the same table. Where do I look these up? I don't get it - is the U with the umlaut the code for a check mark in that particular map?
0
 
LVL 22

Accepted Solution

by:
danaseaman earned 225 total points
ID: 18827926
This is not a Unicode issue. All you need to do is run program Charmap.exe and select Font Wingdings. There you will see all 256 available symbols. Moving mouse over desired symbol will give the Hex code (example 0xFC for Checkmark). Click on the desired symbol, click Select button and it will appear as checkbox in the Textbox window. Then click Copy and it will be placed on the clipboard. Finally paste this character into your source code and it will appear as umlaute (ü).

 
0
 
LVL 6

Assisted Solution

by:bijopuli
bijopuli earned 225 total points
ID: 18827972
Hi

yes danaseaman is right...
your function in the code snippet is setting the font to "Windings"
and drawing the Check Symbol Mark. Actually Windings is a char set which contains all those little graphical symbols instead of letters. and the character code for this check mark is 0xFC. u can observe this in the "Charmap.exe" utility which comes along with windows.

U r seeing the "ü" in your code instead of checkmark because ur Code editor uses some other font (Most probably "Courier")

Are u using VC6 IDE?
if so u can test this simply by selecting that purticular character "ü"

and do the following

Goto Tools > Options, now select Format Tab, select "Source Window" in Catogory, Now there will be a Font: Combo drop down, if u select the Font "Windings" From there and press ok u will see the special character ü as a Check Mark

Is it clear now?

Regards
Bijo.
0
 

Author Comment

by:Wanderinglazyeye
ID: 18828626
I get it. All good. Works fine. What threw me was why in copying one character you get another. Seems anitquated, backwards. But I've got it going now.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now