Please help me somebody to convert unicodestring into string
This is how i am getting unicodestring
UnicodeString _str = OpenDialog1->FileName;
Or if it possible to write into file unicode string with ifstream or something like that?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on your needs, assign the
UnicodeStringto anAnsiStringor aUTF8String, and then write that to your file instead of the originalUnicodeStringitself:Or:
To pass an
AnsiString/UTF8Stringto an STL function, you have to either:1) use the
c_str()method:2) construct a temp
std::string:3) in the case of
AnsiStringonly, specify theVCL_IOSTREAMdefine in your project to enable AnsiString’s own<<<and>>operators: