Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Categories and file types defined lost on C::B restart
280Z28:
msg.Printf() for set
msg << wxString::Format() for append work great, why not just stick with them and leave it?
Michael:
--- Quote from: thomas on December 21, 2005, 11:06:39 pm ---
--- Quote from: Michael on December 21, 2005, 10:57:42 pm ---How about wxMBConv classes?
--- End quote ---
Does not avail. Converts two-byte to variable length and vice versa. I tried, too, it only messes up the string completely.
--- End quote ---
Thank you for your reply. That's not a very good new. I have seen this example and had the idea that it could may be work.
--- Quote ---Example 5: Printing a wxString to stdout in custom encoding. Using preconstructed wxCSConv instance.
--- Code: ---wxCSConv cust(user_encoding);
printf("Data: %s\n", (const char*) str.mb_str(cust));
--- End code ---
Note: Since mb_str() returns a temporary wxCharBuffer to hold the result of the conversion, you need to explicitly cast it to const char* if you use it in a vararg context (like with printf).
--- End quote ---
Anyway, I find strange that it does not work :?. May be a bug in wxWidgets?
Michael
Navigation
[0] Message Index
[*] Previous page
Go to full version