Dylan Dylan - 1 year ago 79
Android Question

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?

Answer Source

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é";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download