Skip to content

float and str2float support broken for french (and probably every locale that use a comma as the decimal separator) #11

Description

@douglaskayama

From @GoogleCodeExporter on March 16, 2015 9:25

What steps will reproduce the problem?
Set either language to French or the region to France in the Preferences.
Type the following commands in Macvim's console ( lines prefixed by >> are the answer, E123 are error codes):
:let a=0.5
>> E806 + E15
:let a=0,5
>> E806 + E15 + E15
:let a=str2float('0.5')
:let a
>> 0,0
:let a=str2float('0,5')
:let a
>> 0,5
What is the expected output? What do you see instead?
Here's what I should get:
:let a=0.5
:let a
>> 0.5
:let a=0,5
>> E15
:let a=str2float('0.5')
:let a
>> 0.5
:let a=str2float('0,5')
:let a
>> 0.0
Note that I was able to get the expected result when I started /Applications/MacVim.app/Contents/MacOS/MacVim from the Terminal with no LC_* env variables. The problem only exist when the app is started from the finder, the dock or Alfred.
What version of MacVim and OS X are you using (see "MacVim->About MacVim"
and "Apple Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6
Intel")?
Tested with both snapshots 69 and release 73 (which I hoped would fix the issue), under Mavericks 10.9.4

Original issue reported on code.google.com by yann.cou...@gmail.com on 9 Sep 2014 at 1:45

Copied from original issue: #511

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions