dshoreman / nextshot

A simple tool for taking screenshots on Linux and sharing via Nextcloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nextshot doesn't work correctly if locale does not use '.' as decimal separator

e-alfred opened this issue · comments

Hello,

I can't take a screenshot of an area or window if the numeric location isn't set to en_US.UTF-8 because BC doesn't seem to be able to do the calculation in a correct way:


$ nextshot -t
/usr/bin/nextshot: Line 343: printf: 1.00000000000000000000: Invalid Number.
/usr/bin/nextshot: Line 343: printf: .39215686274509803921: Invalid Number.
/usr/bin/nextshot: Line 343: printf: .70588235294117647058: Invalid Number.
Starting Nextshot tray menu...

If I start Nextshot using LC_NUMERIC="en_US.UTF-8" /usr/bin/nextshot -t everything works perfectly fine.

@e-alfred If you open a fresh terminal without setting LC_NUMERIC, what's the output of locale?

Currently it is this:

LC_NUMERIC="de_AT.UTF-8"

@e-alfred I've been able to replicate this in a VM and solve it, thankfully without requiring en_US.

I'll release a new version with the fix shortly, thanks again for reporting the issue!

Fix has been pushed to master, and should show up in AUR as v1.3.2 shortly if you're on Arch.

If you still have the problem with the update, please reopen this issue