Page 2 of 3
Re: SOLUTION: UTF-8 in PDF
Posted: Mon Aug 20, 2012 11:54 pm
by admin
flsd,
Before it prints, copy #dataTable# to another temp table so it won't get deleted.
Then see if the characters are correct in the table.
and what character set the table is ..
eg.
CREATE TABLE IF NOT EXISTS `___nu1501f37aeb655c___` (
`ID` int(11) NOT NULL DEFAULT '0',
`OrderID` int(11) NOT NULL DEFAULT '0',
`tra_number` varchar(11) CHARACTER SET utf8 NOT NULL DEFAULT '',
`pro_code` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '',
`Discount_Sum` double(19,2) DEFAULT NULL,
PRIMARY KEY (`ID`,`OrderID`,`tra_number`,`pro_code`),
KEY `ID` (`ID`),
KEY `OrderID` (`OrderID`),
KEY `tra_number` (`tra_number`),
KEY `pro_code` (`pro_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Steven
Re: SOLUTION: UTF-8 in PDF
Posted: Tue Aug 21, 2012 5:25 pm
by flsd
Hi Steven,
All the characters in the temp table are correct, the character set is latin and the engine is InnoDB.
All the other tables, zzsys* included, are utf8 and MyISAM.
Thanks for your help
flsd
Re: SOLUTION: UTF-8 in PDF
Posted: Wed Aug 22, 2012 5:59 pm
by admin
flsd,
You may have already answered this but, Does it work in an HTML report?
Steven
Re: SOLUTION: UTF-8 in PDF
Posted: Wed Aug 22, 2012 7:56 pm
by flsd
Hi Steven,
In HTML, the printing of RECEIPTS (FM008) and TAX INVOICES (FM009) has errors in header but has no errors in details. The printing of PURCHASE ORDERS (FM031) has no errors.
Thanks
flsd
Re: SOLUTION: UTF-8 in PDF
Posted: Fri Aug 24, 2012 6:30 am
by flsd
Steven,
I think, I know what causes the problems with greek characters in HTML reports. Everything exists in the database tables, permanent or temporary, is printed correctly. Variables, strings etc, declared in the report and not exists in tables are printed wrong.
$BankInfo1= 'BSB:', $BankInfo2= 'Περιγραφή:', $BankInfo3= 'Αριθμός Λογαριασμού:', $BankInfo4= 'Bank Details:'
$seCompany=$fmsObj->fms_name, $seAddress=$fmsObj->fms_address, $seCity=$fmsObj->fms_city, $sePostcode =$fmsObj->fms_post_code, $seFax=$fmsObj->fms_fax, $sePhone=$fmsObj->fms_phone, $seState=$fmsObj->fms_state
All the above from FM009 report are printed wrong,
Regards
flsd
Re: SOLUTION: UTF-8 in PDF
Posted: Tue Aug 28, 2012 1:19 am
by admin
flsd,
If you send azipped (.zip) copy of the db to
info@nubuilder.com I'll have a look.
Steven
Re: SOLUTION: UTF-8 in PDF
Posted: Wed Aug 29, 2012 4:44 am
by admin
flsd,
Are A and B the same font?
Untitled.png
Steven
Re: SOLUTION: UTF-8 in PDF
Posted: Wed Aug 29, 2012 8:28 am
by flsd
Steven,
Yes, they are all arial fonts.
The difference is that 'fms_name', 'fms_address', 'fms_city' etc, are database field names, but SECompany', 'SEAddress', 'SECity' are variable names. So, in SQL statetments (nuRunQuery), which used for insert or update data into $datatable, if fms_* replace SE*, the problem is fixed.
To be more clear, 'tri_description' is database field name and is printed correctly, but 'SECompany' is not (gets value from fms_name).
Thanks for your time
flsd
Re: SOLUTION: UTF-8 in PDF
Posted: Wed Aug 29, 2012 8:58 am
by admin
flsd,
What version are you running?
I think this is fixed in version 2.7.4.4
Steven
Re: SOLUTION: UTF-8 in PDF
Posted: Wed Aug 29, 2012 8:52 pm
by flsd
Steven,
I am running 2.7.4.5
In HTML, most of the reports have been corrected.
In PDF, the problem persists.
flsd