ananthakumaran / paisa

Paisa – Personal Finance Manager. https://paisa.fyi demo: https://demo.paisa.fyi
https://paisa.fyi
GNU Affero General Public License v3.0
2.34k stars 117 forks source link

In hledger mode included UTF-8 journal causes failure to sync #68

Closed gitting closed 9 months ago

gitting commented 10 months ago

Describe your Environment OS: Mac Sonoma intel Paisa Version: 0.5.3 (tweaked by author) App Variant: Desktop Locale: en-US

Describe the bug Opening paisa via spotlight fails to sync for a hledger configuration when a main journal includes another journal that is in UTF-8 because of non-ASCII characters.

To Reproduce

Screenshot 2023-10-03 at 9 02 11 PM

Expected behavior Sync succeeds just like in ledger mode.

_paisa.tgz

ananthakumaran commented 10 months ago

@gitting I tried the sample file you provided, still can't reproduce the issue. What is your hledger version? I am using 1.31

PS:

hledger has some info about this error

https://hledger.org/1.31/hledger.html?highlight=invalid%20byte%20sequence#troubleshooting https://hledger.org/install.html?highlight=invalid%20byte%20sequence#check-your-locale

gitting commented 10 months ago

It only happens when paisa is started via Spotlight. If from terminal then it's fine.

The hledger is 1.31 installed via homebrew:

hledger 1.31, mac-x86_64
Usage: hledger CMD [OPTS] [-- ADDONCMDOPTS]

The $LANG is en_US.UTF-8.

Anyway, it is not a show-stopper for me as I'm planning to use paisa in ledger mode anyway. Or start it from terminal - will figure it out. Maybe it's just some weird combination on my machine since I also have haskell installed explicitly.

gitting commented 9 months ago

It is working fine now, thanks!