Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
Delphi
with frmhook.sg 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?

Thanks
Posted
Updated 19-Sep-19 1:38am
Comments
Sergey Alexandrovich Kryukov 25-Apr-13 15:32pm    
Please, what Delphi version is that?
—SA
iDebD 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...
—SA

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:
http://en.wikipedia.org/wiki/Free_Pascal[^],
http://www.freepascal.org/[^].

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

—SA
 
Share this answer
 
v2
Comments
iDebD 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.
—SA
Espen Harlinn 25-Apr-13 18:32pm    
5'ed!
Sergey Alexandrovich Kryukov 25-Apr-13 18:42pm    
Thank you, Espen.
—SA
Remember to check the "font" being used in the TStringGrid. Example: 'MS Sans Serif' does not work!
 
Share this answer
 
Comments
Ken Aiken 18-May-20 12:57pm    
Thanks, this help me. Had everything set to Tahoma except this

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900