?
Solved

chracter set question easy but urgent

Posted on 2007-03-30
5
Medium Priority
?
406 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 29

Assisted Solution

by:pepr
pepr earned 200 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 900 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 900 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 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