[Kmymoney-devel] KMyMoney: proposal to replace hard coded utf-8 in KReportsView::KReportTab

Thomas Baumgart thb at net-bembel.de
Sat Mar 27 08:30:26 CET 2010


Hi,

on Saturday 27 March 2010 Alvaro Soliverez wrote:


> Hello Bernd,
> I applied the encoding fix.
> However, the rest of the patch seems to need more work, because it
> doesn't work here.
> We are close to the release of our upcoming beta, so you can work on
> it a little longer and we'll include it in the next release if it
> passes review.

I backported the working part into the KDE3 version as well.

> Thanks for your contributions!

+1

> On Wed, Mar 24, 2010 at 4:02 PM, Bernd Gonsior <bgo at freeplexx.de> wrote:
> > 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\" />";
> >
> >
> > Proposal:
> >
> > 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
> > Germany
> >
> > phone: +49-30-20 23 89 98
> > email: bgo at freeplexx.de
> 
> _______________________________________________
> KMyMoney-devel mailing list
> KMyMoney-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney-devel
> 

-- 


Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
You have to wait until you have written code before starting an
open source project, otherwise you have made a standards group.
 -- Jeremy Ruston, Head of Open Source Innovation at BT
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 224 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100327/c97f5894/attachment.sig 


More information about the KMyMoney-devel mailing list