Dylan Dylan - 2 months ago 4x
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?


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é";