[Kmymoney-devel] KMyMoney: proposal to replace hard coded utf-8 in KReportsView::KReportTab
asoliverez at gmail.com
Thu Mar 25 02:25:08 CET 2010
I tried it here on my setup and it's not loading the CSS correctly, so
I'll have to take a closer look at it.
Please reply to all, so the development list is included.
On Wed, Mar 24, 2010 at 4:20 PM, Alvaro Soliverez <asoliverez at gmail.com> wrote:
> I'm forwarding this to the mailing list, which is the appropriate
> place to deal with this.
> Thanks a lot for the patch and the clear explanation, I'll review as
> soon as possible for inclusion before next week's release.
> ---------- Forwarded message ----------
> From: Bernd Gonsior <bgo at freeplexx.de>
> Date: Wed, Mar 24, 2010 at 4:02 PM
> Subject: KMyMoney: proposal to replace hard coded utf-8 in
> To: asoliverez at gmail.com
> Dear Mr. Soliverez,
> thank you for developing KMyMoney. It is really great and i do use it for my
> daily work.
> Unfortunately i am a german who intentionally uses latin1 instead of utf-8
> which always made some trouble when creating reports with KMyMoney because
> german umlauts did not appear correct.
> The reason is that 'utf-8' is 2 times hardcoded in KReportsView::KReportTab.
> One can find it in svn revision r1106729 here:
> 1. KReportsView::KReportTab::saveAs, line 147:
> QRegExp exp("(.*)(<link.*css\" href=)\"(.*)\">(<meta.*utf-8\" />)(.*)");
> (this regexp was used to split the just generated html so that css could be
> included inline, but if the encoding was not 'utf-8' but instead e.g. 'latin1'
> this regexp took ages)
> 2. KReportsView::KReportTab::createTable, line 234:
> header += "<meta http-equiv=\"Content-Type\" content=\"text/html;
> charset=utf-8\" />";
> KGlobal::locale()->encoding() should be used instead of hard coded 'utf-8'.
> Furthermore the above mentioned regexp for including css inline could be
> replaced by more clearly declared methods.
> I appended the svn-diffs and the new files to this mail. If you find it
> useful, maybe you can include it in any way you like. The main things are
> outlined in kreportsview.h.
> With best regards
> Dipl.-Ing. Bernd Gonsior
> Dolgenseestrasse 43
> 10319 berlin
> phone: +49-30-20 23 89 98
> email: bgo at freeplexx.de
More information about the KMyMoney-devel