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

Support for Unicode (for memo primarily) #93

Closed nickdex closed 9 months ago

nickdex commented 9 months ago

Describe your Environment OS: Mac Ventura silicon Paisa Version: 0.5.1 App Variant: Desktop

Describe the bug Any unicode value in ledger will break Editor example ₹, ⓘ, characters with emphasis eg Nestlé

To Reproduce Steps to reproduce the behavior:

  1. Go to Editor
  2. Copy paste any of these character
  3. The tallied accounts on right will vanish and app won't let you save giving validation error

Expected behavior Support for unicode

Screenshots Screenshot 2023-11-08 at 8 29 57 PM

Journal 2020/01/01 Amazon Fresh ; Amazon:, Credit-Card:, Cancelled: ; Order ID: 4323 ; Items: ; - Britannia 50-50 Biscuits, 40g ; - Nestlé MAGGI 2-minute Instant Noodles, Masala - 560g Pouch ; Initially charged to Amazon Pay ICICI Bank Credit Card Liabilities:Credit Card:ICICI Amazon -604.0 INR Liabilities:Credit Card:ICICI Amazon 604.0 INR

Note - Something nice to have, not a showstopper but annoying since it doesn't point out line number so you have to manually scan each line of entire ledger. If you have bandwidth or maybe someone will fix it in next year's hacktoberfest

ananthakumaran commented 9 months ago

The error comes from the ledger cli. It does support UTF-8, provided the LANG env variable is set properly (example LANG=en_US.UTF-8). I am assuming Macos is not setting any env variable while launching the Desktop app (I have received a lot of reports related to this). To confirm, you can check if works via paisa-cli.

image

ananthakumaran commented 9 months ago

@nickdex could you check if the issue is fixed in the latest release 0.5.7

nickdex commented 9 months ago

It works now. Thank you! @ananthakumaran