Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
e-alfred opened this issue Mar 30, 2020 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@e-alfred
Copy link

e-alfred commented Mar 30, 2020

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 e-alfred changed the title Nextcloud doens't wor corretly if locale isn' Nextcloud doesn't work corretly if locale isn't set to US Mar 30, 2020
@e-alfred e-alfred changed the title Nextcloud doesn't work corretly if locale isn't set to US Nextshot doesn't work corretly if locale isn't set to US Mar 30, 2020
@dshoreman
Copy link
Owner

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

@e-alfred
Copy link
Author

e-alfred commented Apr 2, 2020

Currently it is this:

LC_NUMERIC="de_AT.UTF-8"

@dshoreman
Copy link
Owner

dshoreman commented Apr 3, 2020 via email

@dshoreman dshoreman added the bug Something isn't working label Apr 6, 2020
@dshoreman dshoreman self-assigned this Apr 6, 2020
@dshoreman dshoreman added this to the v1.3 milestone Apr 6, 2020
@dshoreman
Copy link
Owner

dshoreman commented Apr 6, 2020

@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!

@dshoreman
Copy link
Owner

dshoreman commented Apr 6, 2020

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

@dshoreman dshoreman changed the title Nextshot doesn't work corretly if locale isn't set to US Nextshot doesn't work correctly if locale does not use '.' as decimal separator Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants