简体   繁体   中英

C++Builder: How to display accent in Android Application?

I am developping an Android application using C++ Builder 10.1 Berlin. As I create this app for a French company, I would like to display accent. For example, I have a String Grid with an Header text "Libellé". So I wrote this header title like this:

StringGrid1->ColumnByIndex(0)->Header = "Libellé"

But when I run the app, I have an unknown character ( a black diamond with a question mark).

How can I display accent in an Android?

You have to define the string literal as a wide literal (using wchar_t characters), not a narrow literal (using char characters). Prefix the literal with L to make it wide:

StringGrid1->ColumnByIndex(0)->Header = L"Libellé";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM