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

[fix] fixed error "using Float as a String" when system locale using comma as float separator #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TKr
Copy link

@TKr TKr commented Feb 4, 2016

Mac OSX, phpstorm terminal vs system terminal

When LC_NUMERIC="C"
let s:goldenview__golden_ratio = 1.618
end with error using Float as a String

When i set LC_NUMERIC="pl_PL.UTF-8"
let s:goldenview__golden_ratio = 1.618
without problem.

After fix:
When LC_NUMERIC="C"
let l:golden_ratio_dot = str2float("1.618") /// 1
let l:golden_ratio_comma = str2float("1,618") /// 1,618
When LC_NUMERIC="pl_PL.UTF-8"
let l:golden_ratio_dot = str2float("1.618") /// 1.618
let l:golden_ratio_comma = str2float("1,618") /// 1

Then
let s:goldenview__golden_ratio = l:golden_ratio_xxxx
and both without errors.

@ReneFroger
Copy link

Please try golden-ratio on Emacs instead.

@dgilge
Copy link

dgilge commented Jan 23, 2018

Same issue here.

E806: using Float as a String
E15: Invalid expression: 1.618

Are there plans to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants