[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

chracter set question easy but urgent

Posted on 2007-03-30
5
Medium Priority
?
412 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

650 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