User forums > Using Code::Blocks
Problems with umlaut in wxSmith
geronet:
I have WinXP SP2 (German), the latest C::B and gcc.
If i change the text label from the program with
--- Code: (c) ---StaticText3->SetLabel(_T("°C"));
--- End code ---
it is correctly displayed, but that's not a solution.
In the .xrc it is also correct:
--- Code: (c) ---<label>°C</label>
--- End code ---
Any Suggestions? (perhaps in German?) ;)
geronet:
If i try to compile with unicode enabled, i get a lot of errors with every string:
main.cpp:213:1: converting to execution character set: Illegal byte sequence
Line 213:
wxMessageBox(_T("Konfigurationsdatei ist beschädigt!"), _T("Fehler"));
The problem is the "ä", if i delete it the error is gone...
geronet:
I'm stuck now. If i compile in ANSI mode, i get dialogs like shown in the first post.
If i compile in unicode mode, i get errors because of the char '°' in the string shown here:
--- Code: (c) ---Textfield[i]->SetLabel(wxString::Format(_T("%.1f°C"), *(T[i].value)));
--- End code ---
And now? I don't know..
kagerato:
--- Quote from: geronet on August 04, 2006, 10:29:39 pm ---I'm stuck now. If i compile in ANSI mode, i get dialogs like shown in the first post.
If i compile in unicode mode, i get errors because of the char '°' in the string shown here:
--- Code: (c) ---Textfield[i]->SetLabel(wxString::Format(_T("%.1f°C"), *(T[i].value)));
--- End code ---
And now? I don't know..
--- End quote ---
Are your source files using an ANSI encoding? If so, try using UTF-8.
geronet:
--- Code: (cpp) --- Textfield[i]->SetLabel(wxString::Format(_T("%.1f\x00B0C"), *(T[i].value)));
--- End code ---
with the help of the chart
http://www.unicode.org/charts/PDF/U0080.pdf
displays the character correctly on Linux, with msw i get some undefined character.
Maybe the cpp-file on Windows is ANSI? How can i change that?
On Linux i get
--- Quote ---file main.cpp
main.cpp: ISO-8859 C program text, with CRLF, LF line terminators
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version