Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow libofx to handle decoding imported files #591

Merged
merged 4 commits into from
Feb 3, 2023
Merged

Conversation

j-f1
Copy link
Contributor

@j-f1 j-f1 commented Jan 30, 2023

This avoids assuming that imported OFX files are UTF-8 and defers to libofx, which handles reading the CHARSET header in the file and using that encoding to read its content. Fixes #189. (Tested with the provided file and it works fine!)

@netlify
Copy link

netlify bot commented Jan 30, 2023

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit e0c23f1
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/63d815cb899e2000082a2137
😎 Deploy Preview https://deploy-preview-591--actualbudget.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@MatissJanis
Copy link
Member

How do I test this? I tried importing the given file, but I keep getting an error
Screenshot 2023-01-31 at 20 43 58

@j-f1
Copy link
Contributor Author

j-f1 commented Jan 31, 2023

Weird, it works fine for me. Did you uncompress the downloaded GZIP file first? Once I do that I’m able to view the relve.qfx file as a text file or import it into the app.

@MatissJanis
Copy link
Member

No, I didn't uncompress it. I actually can't do it on OSX (Ventura 13.1).

Screenshot 2023-01-31 at 22 52 26

@MatissJanis
Copy link
Member

Yeah, I can't seem to get the file open on OSX. So can someone else on a Win/Linux machine test the change and let me know if it works as expected?

I can then do the code review.

@j-f1
Copy link
Contributor Author

j-f1 commented Feb 3, 2023

@MatissJanis Can you try with https://raw.githubusercontent.com/actualbudget/actual/b84c58ad0bf1db194ad954b995b8ff6d65d496e1/packages/loot-core/src/mocks/files/8859-1.qfx? That’s the uncompressed version of the file that was shared with us. (I was able to decompress using gunzip and BetterZip on my Mac, not sure why Archive Utility fails)

Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @j-f1 ! Was able to reproduce the issue and then also reproduce the fix in the preview deployment.

LGTM

@j-f1 j-f1 merged commit 212b854 into master Feb 3, 2023
@j-f1 j-f1 deleted the libofx-charset branch February 3, 2023 19:12
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Feb 3, 2023
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
* Allow libofx to handle decoding imported files

* Add releve.qfx as a test file

* Remove irrelevant redacted transactions from test file

* Fix console overload from long console.warn stacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is charset/encoding supported when importing qfx files?
2 participants