ananthakumaran/paisa

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

Closed this issue · 3 comments

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

  • place the attached journals in some directory
  • configure paisa to point to main.journal and be in hledger mode
  • ensure paisa is launched via Spotlight
  • try to sync
  • observe an error per below:
Screenshot 2023-10-03 at 9 02 11 PM

Expected behavior
Sync succeeds just like in ledger mode.

_paisa.tgz

@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

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.

It is working fine now, thanks!