Unicode rendering in Preview
Polomint
Australia
Some time ago I reported a problem with rendering unicoded currency symbols in the PDFed version of a Fast Report.
That was fixed (I think with v5.3.6).
However we still have a minor problem with unicodes in the FastReports Preview screen. A printed version of the report has the same issue. Exporting to PDF (and then printing) is fine however.
Attached are screen grabs from the same test data and code-base (taken a couple of days apart) that show the Rupee symbol rendered correctly in PDF export, but not in Preview. The program was built with FastReports v5.6.
Is there something simple we should do to fix this?
That was fixed (I think with v5.3.6).
However we still have a minor problem with unicodes in the FastReports Preview screen. A printed version of the report has the same issue. Exporting to PDF (and then printing) is fine however.
Attached are screen grabs from the same test data and code-base (taken a couple of days apart) that show the Rupee symbol rendered correctly in PDF export, but not in Preview. The program was built with FastReports v5.6.
Is there something simple we should do to fix this?
Comments
Attach your report template with Rupee symbol here
The code in the event looks like:
The gblfmtDefaultCurrency value is "'$'#,##0.00' ';('$'#,##0.00)" for AUD (Australia).
GetCurrencyFormat returns "'₹'#,##0.00' ';('₹'#,##0.00)" for INR (India).
FormatCurr is the standard SysUtils function.
Your reply has prompted me to do what I should have tried first!
I've built a basic testbed using the Test.fr3 file you provided, and have now added to it (in the BeforePrint event) code to populate the Memo1.Text.
So far it is all operating as it should.
I'll experiment further to find out what causes the odd behaviour of our application. Once I know that, I'll post it here (as possible help to others).
If Charset is "Default_Charset" both Preview and PDF Export successfully handle the Unicode character (Rupee symbol) regardless of whether it is set literally or via Delphi code.
If Charset is "ANSI_Charset" then Preview handles the Unicode character incorrectly when set via code, but correctly when set as a literal. PDF Export is correct for both methods of setting the character.
While this was a minor inconvenience, and is now easily remedied, I am still tempted to raise a Ticket, because this could cause someone else to waste a lot of time trying to work out what is happening.
I will raise a ticket if I get one or more votes from Forum Members to do so