Click here to Skip to main content
11,487,406 members (70,230 online)
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 Sergey Alexandrovich Kryukov 9,063
1 OriginalGriff 8,287
2 Sascha Lefèvre 3,334
3 Maciej Los 2,946
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web02 | 2.8.150520.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