beanquery icon indicating copy to clipboard operation
beanquery copied to clipboard

Unicode support for output in bean-query

Open Pirshtuk opened this issue 1 year ago • 1 comments

I am using cyrillic account names in ledger.beancount: 2020-01-01 open Активы:Bank

Account name in terminal ouput looks differently:

...>bean-query ledger.beancount
Input file: "..." Ready with ... beancount> balances from year = 2024 account sum_position


╨Р╨║╤В╨╕╨▓╤Л:Bank 100 USD

Expected to see: Активы:Bank:Bank 100 USD

Pirshtuk avatar May 05 '24 19:05 Pirshtuk

On which OS is this?

dnicolodi avatar May 20 '24 21:05 dnicolodi

No reply for several months. Closing.

dnicolodi avatar Jan 24 '25 14:01 dnicolodi

On which OS is this?

Windows 11

Pirshtuk avatar Jan 25 '25 16:01 Pirshtuk

What do the following commands output?

python -c 'import sys; print(sys.getdefaultencoding())'
python -c 'print(b"\xd0\x90\xd0\xba\xd1\x82\xd0\xb8\xd0\xb2\xd1\x8b".decode("utf8"))'

They should output something like:

$ python -c 'import sys; print(sys.getdefaultencoding())'
utf-8
$ python -c 'print(b"\xd0\x90\xd0\xba\xd1\x82\xd0\xb8\xd0\xb2\xd1\x8b".decode("utf8"))'
Активы

dnicolodi avatar Jan 27 '25 18:01 dnicolodi

C:\Users\user>python -c "import sys; print(sys.getdefaultencoding())"
utf-8

C:\Users\user>python -c "print(b'\xd0\x90\xd0\xba\xd1\x82\xd0\xb8\xd0\xb2\xd1\x8b'.decode('utf8'))"
Активы

Pirshtuk avatar Apr 09 '25 13:04 Pirshtuk