Click here to Skip to main content
12,078,795 members (49,051 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 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 25-Apr-13 15:32pm
   
Please, what Delphi version is that?
—SA
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...
—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 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

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.160212.1 | Last Updated 25 Apr 2013
Copyright © CodeProject, 1999-2016
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