Strange character shown in DBCheckBox for Delphi XE2 application running in Chinese PRC locale
Hi,
Class TMyCheckBox and TMyDBCheckBox in unit myChkBox.pas has the
following implementation:
const
cEmptyBox = AnsiChar(168);
cCheckMarkInBox = AnsiChar(254);
cCheckMark = AnsiChar(252);
cXMark = AnsiChar(251);
cXInBox = AnsiChar(253);
procedure TmyCustomCheckBox.PropertiesToDrawCommand(aDrawCommand:
TppDrawCommand);
var
lDrawText: TppDrawText;
begin
inherited PropertiesToDrawCommand(aDrawCommand);
...
lDrawText.Text := String(GetCheckCharacter);
...
end;
The five constant is declared as AnsiChar but the lDrawText.Text grab
the constant char as string.
This will cause problem for application built with Delphi XE2 running in
Chinese PRC locale. The check box will not display properly. I think
it should define as:
lDrawText.Text := AnsiString(GetCheckCharacter);
--
Best regards,
Chau Chee Yang
Class TMyCheckBox and TMyDBCheckBox in unit myChkBox.pas has the
following implementation:
const
cEmptyBox = AnsiChar(168);
cCheckMarkInBox = AnsiChar(254);
cCheckMark = AnsiChar(252);
cXMark = AnsiChar(251);
cXInBox = AnsiChar(253);
procedure TmyCustomCheckBox.PropertiesToDrawCommand(aDrawCommand:
TppDrawCommand);
var
lDrawText: TppDrawText;
begin
inherited PropertiesToDrawCommand(aDrawCommand);
...
lDrawText.Text := String(GetCheckCharacter);
...
end;
The five constant is declared as AnsiChar but the lDrawText.Text grab
the constant char as string.
This will cause problem for application built with Delphi XE2 running in
Chinese PRC locale. The check box will not display properly. I think
it should define as:
lDrawText.Text := AnsiString(GetCheckCharacter);
--
Best regards,
Chau Chee Yang
This discussion has been closed.
Comments
cEmptyBox = Char(168);
cCheckMarkInBox = Char(254);
cCheckMark = Char(252);
cXMark = Char(251);
cXInBox = Char(253);
Nice that somebody also see this problem.
I have the same problem with Russian PRC locale.
I notify about it more then 2 years ago!!! 10 releases ago!!!
Simple change on Char(168)... don't fix the problem fully in my case.
I used something like this (cEmptyBox = #$00A8) but this is not fix
problem with
pdf export.
Don't test this in RB 14.
Can you test that preview, PDF, HTML and RTF export work correct after
your patch?
has any side effect on the export?
I apologize for the delay. These issues are very difficult to track
down and time consuming due to the fact that each time we change our
machine locale, we are required to restart.
I have created a fix that so far functions correctly in the preview and
PDF with Chinese PRC, Russian, and US English locales. This will be
included in the next version of ReportBuilder.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I have some problems with HTML also.
I send you test project and my export result 25 May 2012.
You are respond that:
You get the same result and it look fine on your machine?
Is my export result look fine on your machine?
May be problem with my brouser and fonts for it?
Can you check HTML export one more time please.
Thank you for your work!!!
On Wed, 12 Sep 2012 00:17:04 +0300, Nico Cizik (Digital Metaphors)
I took a look at this again and (with the changes I had made previously)
noticed that checkboxes were not displaying correctly with Russian
locale. This will be fixed for the next release as well.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com