Click here to Skip to main content
Rate this: bad
good
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 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 25-Apr-13 10:18am
iDebD842
Comments
Sergey Alexandrovich Kryukov at 25-Apr-13 15:32pm
   
Please, what Delphi version is that?
—SA
bubaidada at 25-Apr-13 15:38pm
   
Delphi 7
Sergey Alexandrovich Kryukov at 25-Apr-13 15:43pm
   
It won't work with Unicode, unfortunately. You need v.12 or later. Or switch to Free Pascal...
—SA

1 solution

Rate this: bad
good
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:
http://en.wikipedia.org/wiki/Free_Pascal[^],
http://www.freepascal.org/[^].
 
Please see my past answer:
'اردو ویکیپیڈیا' showing '? ?' in delphi editor?[^].
 
—SA
  Permalink  
v2
Comments
bubaidada at 25-Apr-13 15:39pm
   
Thanks for your Input... :)
Sergey Alexandrovich Kryukov at 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 at 25-Apr-13 18:32pm
   
5'ed!
Sergey Alexandrovich Kryukov at 25-Apr-13 18:42pm
   
Thank you, Espen.
—SA

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

  Print Answers RSS
0 OriginalGriff 240
1 Kamal Rocks 184
2 BillWoodruff 173
3 PIEBALDconsult 160
4 CPallini 155
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 25 Apr 2013
Copyright © CodeProject, 1999-2014
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