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 inhledger
mode - ensure paisa is launched via Spotlight
- try to sync
- observe an error per below:
![Screenshot 2023-10-03 at 9 02 11 PM](https://private-user-images.githubusercontent.com/3186756/272458097-90a5a9e1-14dd-4f67-a52f-e499c9ac38b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0Mjk4MTIsIm5iZiI6MTcyMDQyOTUxMiwicGF0aCI6Ii8zMTg2NzU2LzI3MjQ1ODA5Ny05MGE1YTllMS0xNGRkLTRmNjctYTUyZi1lNDk5YzlhYzM4YjkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDhUMDkwNTEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2M2OTg5NWU2NGJjMjU0MTlmZjFiYTIyMWU1YzBhMmNkODQ2NDE2NzRkZWNhMTk5ZDQxZWJmY2VhNzA1NDhiMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.sEOtw-h0wL7rGMN80jXZvo0b-HZeZtd0wcjjGCYZrKc)
Expected behavior
Sync
succeeds just like in ledger
mode.
@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!