Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Unicode conversion (attention all devs)

<< < (2/23) > >>

Ceniza:
What do I do?! What do I do?!

Oh, nevermind, I'll convert the help_plugin :)

I should take care of the AStyle plugin too but I think I don't have write access there.

Anyway, I'll inform you this weekend.

rickg22:
Ceniza: You don't need write access, mail the changes to me :)

Anyway, I'll start with 9 and 10, followed by 12 and 13.

Update: Done.  :shock: wow, that was fast. Took me 2 hours and 10 minutes. Now I'm compiling and testing.

rickg22:
Any doubts please post in this thread.

rickg22:
IMPORTANT!!!

XRCID and XRCCTRL macros must _NOT_ be converted! They're pre-converted already!


--- Quote ---WRONG:   XRCCTRL(*this, _T("lblLabel"), wxStaticText)->SetLabel(label);
--- End quote ---


--- Quote ---RIGHT:   XRCCTRL(*this, "lblLabel", wxStaticText)->SetLabel(label);
--- End quote ---

Also, be careful. Some of the strings already converted in C::B, use _( when they should be _T(.

Example:


--- Quote --- WRONG: wxXmlResource::Get()->LoadDialog(this, parent, _("dlgGenericMultiSelect"));
--- End quote ---
dlgGenericMultiSelect is a reference to a resource. Therefore it must use _T instead.

--- Quote --- RIGHT: wxXmlResource::Get()->LoadDialog(this, parent, _T("dlgGenericMultiSelect"));
--- End quote ---

And don't forget to test for single characters, too!


--- Quote ---'c'
--- End quote ---

and

--- Quote ---char
--- End quote ---

Hints: Use the search dialog  :roll: should be obvious by now. Search for "  and '  (single-file) and char (whole word, search in open files).

After replacing the strings in the file, make sure you search again and double-check <- THIS IS VERY IMPORTANT.

me22:
Note: TinyXML needs to NOT be put in Unicode mode.  Use the wxString facilities for getting a wxString to a UTF-8 encoded char*.  Perhaps we can have some typedefs and parallel defines somewhere to make this easier?  perhaps wxString_from_tinyString function and tinyString_from_wxString inlines and a tiny_() and tiny_T() macro?

Something like the following in a global include, perhaps?
#define tinyxml_T(m) m
#define wxString_from_tinyXMLstring( s ) ( wxString( (s), wxConvUTF8 ) )
#define tinyXMLstring_from_wxString( s ) ( (s).mb_str(wxConvUTF8) )

[edit] Ok, I should have read closer before posting, the above was true as of 1.0-beta6, but perhaps less neccesary now? :|  I'll try and help out this weekend.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version