Skip Menu |

This queue is for tickets about the Finance-OFX-Parse-Simple CPAN distribution.

Report information
The Basics
Id: 61358
Status: resolved
Priority: 0/
Queue: Finance-OFX-Parse-Simple

People
Owner: JJONES [...] cpan.org
Requestors: Allen.Conway [...] atosorigin.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.01
  • 0.02
  • 0.03
Fixed in:
  • 0.04
  • 0.05



Subject: parsing TRNAMT fields
Date: Wed, 15 Sep 2010 16:48:42 +0200
To: "bug-Finance-OFX-Parse-Simple [...] rt.cpan.org" <bug-Finance-OFX-Parse-Simple [...] rt.cpan.org>
From: Conway Allen <Allen.Conway [...] atosorigin.com>
Hello, There's a problem when these fields are formatted in European fashion, i.e. with a comma instead of a decimal point - the value returned is just what comes in front of the comma so cents are dropped... There needs to be some way to say what the character is separating the dollars from the cents! best regards Show quoted text
________________________________ Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Hi, Thanks for the report. This is fixed as of version 0.04 (& 0.05 which is the same except for minor documentation changes). The module now follows the system's current locale setting for the decimal point character, using POSIX if available, otherwise falling back to a dot. I had some issues when testing a version which let you manually override the system's locale setting, but if you'd be willing to assist me with that then please get in touch. Otherwise hopefully the revisions above will resolve the issue for you. If you can't see them yet then you can also get it from Github on http://github.com/JeremyJones/Finance--OFX--Parse--Simple Thanks! Jeremy On Wed Sep 15 10:49:03 2010, Allen.Conway@atosorigin.com wrote: Show quoted text
> Hello, > > There's a problem when these fields are formatted in European fashion, > i.e. with a comma instead of a decimal point - the value returned > is just what comes in front of the comma so cents are dropped... > There needs to be some way to say what the character is separating > the dollars from the cents! > > best regards
Subject: RE: [rt.cpan.org #61358] parsing TRNAMT fields
Date: Tue, 28 Sep 2010 15:40:00 +0200
To: "bug-Finance-OFX-Parse-Simple [...] rt.cpan.org" <bug-Finance-OFX-Parse-Simple [...] rt.cpan.org>
From: Conway Allen <Allen.Conway [...] atosorigin.com>
Hello. I should have got back to you sooner... I haven't picked up your corrected version yet. I'm not sure it'll work very well for me, however, because, for instance, I have 2 banks and one uses a decimal point and the other a comma! Using the locale setting is, of course, better than just assuming that the decimal separator is a point. It seems to me that if you did something like if ( $s =~ m/<TRNAMT>\s*(-|\+)?\s*(?:(\d*)(?:[.,](\d\d))?)/so ) { $1 . $2 . '.' . $3; }; That would (probably/possibly) handle everything - I can't believe that any other character is used anywhere else. Anyway that regex certainly handles correctly the data my 2 banks send me. Thanks for your help, anyway. Allen. Show quoted text
-----Original Message----- From: Jeremy Jones via RT [mailto:bug-Finance-OFX-Parse-Simple@rt.cpan.org] Sent: Thursday, September 16, 2010 8:29 PM To: Conway Allen Subject: [rt.cpan.org #61358] parsing TRNAMT fields <URL: https://rt.cpan.org/Ticket/Display.html?id=61358 > Hi, Thanks for the report. This is fixed as of version 0.04 (& 0.05 which is the same except for minor documentation changes). The module now follows the system's current locale setting for the decimal point character, using POSIX if available, otherwise falling back to a dot. I had some issues when testing a version which let you manually override the system's locale setting, but if you'd be willing to assist me with that then please get in touch. Otherwise hopefully the revisions above will resolve the issue for you. If you can't see them yet then you can also get it from Github on http://github.com/JeremyJones/Finance--OFX--Parse--Simple Thanks! Jeremy On Wed Sep 15 10:49:03 2010, Allen.Conway@atosorigin.com wrote:
> Hello, > > There's a problem when these fields are formatted in European fashion, > i.e. with a comma instead of a decimal point - the value returned > is just what comes in front of the comma so cents are dropped... > There needs to be some way to say what the character is separating > the dollars from the cents! > > best regards
Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Hi, Ok version 0.06 of Finance::OFX::Parse::Simple is available on Github and uploaded to CPAN. Using this version you can manually specify the character to use for the decimal point within your OFX data prior to parsing. The environment variable MON_DECIMAL_POINT is checked first, so you can specify a character to use in that variable (e.g. local $ENV{MON_DECIMAL_POINT} = ',') prior to parsing the data, and that allows you to control the character per-parse when using data from disparate sources. I hope this helps but let me know any remaining issues. Thanks, Jeremy