News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Last standing unicode problem

Started by mandrav, November 24, 2005, 02:02:40 PM

Previous topic - Next topic

MortenMacFly

In http://forums.next.codeblocks.org/index.php?topic=1693.0 280Z28 might have stated a solution for the unicode problem. Look at this:

wxString str;
str.Printf(_T("MyString%d"), 5);

This should result in a unicode compatible "MyString5". Does this help?
Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

thomas

Quote from: me22 on December 10, 2005, 08:14:15 PMIn fact, it basically never it, since to be unicode it's have to be UTF-32 ( otherwise you'd have surrogate troubles ) and I've never seen a numeric_limits<wchar_t>::digits large enough for that to be possible.
On my FC4 box, sizeof(wchar_t) says 4.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

rickg22

Actually making a u2s (unsigned int to string) function isn't that hard... just keep dividing over 10 and concatenating to a string (it produces a reversed number). Then you just reverse the elements and ta-da :)

anonuser

a wchar_t will always hold a unicode character as long as you're going by GNU standards.
So there should be no problem.