Separate payees with newline instead of semicolon
ClosedPublic

Authored by wojnilowicz on May 2 2017, 12:48 PM.

Details

Diff Detail

Repository
R261 KMyMoney
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wojnilowicz created this revision.May 2 2017, 12:48 PM

I would think to use some percent encoding is more appropriate and easier to extend in the future. Can't we use QUrl::toPercentEncoding() here to do some conversion behind the scenes? That would also be 100% backward compatible. Just an idea.

I would think to use some percent encoding is more appropriate and easier to extend in the future. Can't we use QUrl::toPercentEncoding() here to do some conversion behind the scenes? That would also be 100% backward compatible. Just an idea.

I don't get your idea. All we need is separator symbol that isn't going to be used in payee's name and not a mean to encode/decode it.
I think my solution is the least work required for it to work.

I don't get your idea. All we need is separator symbol that isn't going to be used in payee's name and not a mean to encode/decode it.
I think my solution is the least work required for it to work.

I understand, but having a \n in the value part of an attribute of an XML element is a PITA if you want to process your file with an external tool. It is perfectly OK in terms of XML, though. So replacing a ';' in the key value with a %3B and using the ';' as separator makes it a lot easier to process the data line-wise.

I don't get your idea. All we need is separator symbol that isn't going to be used in payee's name and not a mean to encode/decode it.
I think my solution is the least work required for it to work.

I understand, but having a \n in the value part of an attribute of an XML element is a PITA if you want to process your file with an external tool. It is perfectly OK in terms of XML, though. So replacing a ';' in the key value with a %3B and using the ';' as separator makes it a lot easier to process the data line-wise.

I see in .kmy that \n is encoded as 
 so there is some kind of encoding already that isn't obvious. Isn't that equally good?

tbaumgart accepted this revision.May 2 2017, 5:14 PM

Ah, I see. I did not remember that the \n is already encoded. So everything is fine.

This revision is now accepted and ready to land.May 2 2017, 5:14 PM
This revision was automatically updated to reflect the committed changes.