Reputation: 157
I want to make an application in Embarcadero C++ Builder XE totally in ASCII but C++ Builder XE's VCL are now UNICODE base.
Anybody has any kind of idea that how can I do that
If any Preprocessor Directives or anything else
I want to use sqlite3 as a backend, but all the code examples I see use ASCII and the Unicode doesn't work for me.
I've been Googleing it for couple of days but didn't find any solution
Upvotes: 0
Views: 2413
Reputation: 7220
You can use the AnsiString string classes, the different VCL strings convert without problems between each other. If you have a UnicodeString and want to access the character array as regular 8 bit characters instead of the wchar_t
datatype you can use the t_str()
function instead of the c_str()
.
I would however suggest that you looked at the UTF8String
class, it is one of the most interesting of the string classes because it is backwards compatible with 7-bit ASCII as well as giving you the possibility of supporting international characters.
Upvotes: 2