Click here to Skip to main content
11,928,352 members (59,640 online)
Rate this:
Please Sign up or sign in to vote.
See more: Delphi Unicode
Hi, I have a TStringGrid; When am writing in the grid, it is showing ????? ????? instead of showing و ویکیپیڈیا .

The string which I am setting in TStringGrid is in Unicode, as if I can show it via messagebox;

Following code setting unicode string:
with do begin
          if Cells[1,1] <> '' then RowCount := RowCount + 1;
          i := 0;
          inc(i); Cells[i,RowCount-1] :=strDataType;
          inc(i); Cells[i,RowCount-1] :=strDocument;

The string strDataType is fine, If I put a messagebox there it is showing correct one , but in TStringGrid it is ????????

Can any one help?

Posted 25-Apr-13 10:18am
Sergey Alexandrovich Kryukov 25-Apr-13 15:32pm
Please, what Delphi version is that?
bubaidada 25-Apr-13 15:38pm
Delphi 7
Sergey Alexandrovich Kryukov 25-Apr-13 15:43pm
It won't work with Unicode, unfortunately. You need v.12 or later. Or switch to Free Pascal...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You need to use Unicode-enabled version of VCL, which came with Delphi v.12. If you have older version of Delphi, this is a problem.

You can also switch to Free Pascal. It has a Delphi compatibility mode and Unicode-enabled VCL:[^],[^].

Please see my past answer:
'اردو ویکیپیڈیا' showing '? ?' in delphi editor?[^].

bubaidada 25-Apr-13 15:39pm
Thanks for your Input... :)
Sergey Alexandrovich Kryukov 25-Apr-13 15:46pm
Are you accepting the answer formally (green button) or not? I gave you some options.
Perhaps you can also use LMD ElPack as Eugene Mayeski advised, but I never tried; I think this is a commercial library, so you should be better off with newer Delphi or with Free Pascal.
Espen Harlinn 25-Apr-13 18:32pm
Sergey Alexandrovich Kryukov 25-Apr-13 18:42pm
Thank you, Espen.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 25 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100