Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Unicode conversion (attention all devs)
byo:
There's one thing important when working with concatenated strings:
_() is macro which calls one of wxWidget's internal function so concatenating should look like this:
--- Code: ---_("string 1" "string2" ... )
--- End code ---
_T() macro simply adds 'L' before string given as a param (in Unicode of course, in normal mode it do nothing with the string) so concatenation should be:
--- Code: ---_T("string1") _T("string2") ...
--- End code ---
BTW. Answer to my previous post about Printf-like functions is - use c_str() (in examples in wxwidgets.org there are used different arguments for unicode and non-unicode versions where formating string was both "%s")
byo:
--- Quote from: tiwag on August 05, 2005, 11:18:36 pm ---btw
i really don't like the fact, that we can't rely on the wx.chm docs
that's a lot of additional work to study the header's all the time
somewhat boring ... but what can we do else ?
--- End quote ---
I try to compile changed sources in both Unicode and NonUnicode versions of wxWidgets (and after that in wx2.4 and wx2.6 to make sure it will work everywhere). Unfortunately all project can't be compiled in Unicode but separate files can :)
Ceniza:
Ok, I got the AStyle plugin to compile with wxWidgets UNICODE, but not to link ('cause it needs libcodeblocks.a which I didn't compile, and I think the reasons are obvious).
Anyway, it wasn't that bad. There was only an evil line and this was my workaround:
--- Code: ---#ifdef wxUSE_UNICODE
formattedText << wxString(formatter.nextLine().c_str(), wxConvLocal);
#else
formattedText << formatter.nextLine().c_str();
#endif
--- End code ---
I couldn't find any other way to get it work. If you've got a working trick which looks better let me know, otherwise that could work in the meanwhile if someone else need it.
rickg22: I'll send it to your e-mail when a decision be made, ok?
[edit]
Hmmm, I should add that formatter.nextLine() returns std::string :)
[/edit]
byo:
I will take group 15 (previous groups done, sent to rickg22)
rickg22:
--- Quote from: tiwag on August 05, 2005, 11:18:36 pm ---
thats what i've already done ... thanks byo ... i really got unsure for a moment ... :shock:
--- End quote ---
Yeah! :shock: whew... glad i've done nothing wrong.
ANYWAY GUYS... yes, i checked the includes. Apparently we have nothing to worry about doing "too much conversion" regarding wxString functions and operators. And if you have doubts, go to the header files!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version