Unicode Problem in TAdvStringgRID


I'm using the TAsvStringgrid to display instagram userdata. For the username, unicode is often be used. But the display of some of this unicode strings seems to be broken.

The TadvStringGrid is filled by using the GetDisplText event. The unicode based username is printed in column 3, The colums 4 and 5 are non unicode user IDs.
Sometimes, the column3 is printed, but the colums 4 and 5 not. I think, it depends on the used unicode inside column 3. 

In image 1, you can see the problem. "Melissa" is printed well, but the IDs are empty.In the next row, there is unicode too, but the IDs in col 4 and 5 are correct.

To test the issue, I've cated the unicode string to an ANSIString in the GetDisplText event. After this, the complete table is correct (besides the wrong display of the username)

I hope, the description is understandable.


no copy'n paste of images in this forum. ;-)

The missing images.


Image 2:

What Delphi version do you use?

If this is a Delphi version with unicode support (Delphi 2009 or newer), all strings are by default unicode and we are not aware of any issue with displaying unicode strings. 
In a unicode Delphi version, you can return a unicode string via OnGetDisplText. If you use a
 non-unicode Delphi version and have a unicode string, you can use the OnGetDisplWideText event and return the unicode string this way.
I'm using the current Delphi 10.3.
Most Unicode Strings aren't a problem. But some of them are showing this strange behaviour. For example "π•Έπ–Šπ–‘π–Žπ–˜π–˜π–†". If the OnGetDisplText sets a value to this string, all following Cells in the same row seems to be empty (see image 1).

The unicode string "πŸ’πŸŽπŸ.πŸŽπŸ—.πŸπŸŽπŸπŸ—πŸ’" works perfectly.

I tested this here. The IDE apparently has issue with this special string but the grid not:

It's a very strange behavior.
I can confirm, that your example is working fine. The unicode string is hardcoded. My string is loaded from a database into a common string variable. This doesen' work.

But I've found a workaround:
the following screenshots are from the GetDisplText event (case ACol of):

This dosen' work:

This works:

This dosen' work:

For me, this workaround is ok.

Thank you, for your fast support. !!