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

comma on em #234

Closed
metalgigio opened this issue Feb 2, 2015 · 5 comments
Closed

comma on em #234

metalgigio opened this issue Feb 2, 2015 · 5 comments

Comments

@metalgigio
Copy link

Hi,
i just tried to compile a simple script but it replace dot with comma.

mb {

        font-size: 0.875em;
    }

it compile to:

mb {

font-size: 0,875em; }

whi does it happen?
I'm italian so i'm sorry for my english

@howard
Copy link

howard commented Apr 3, 2015

It may have to do with your system being set to an Italian locale, which would print floating point numbers with a comma as decimal separator. Changing your locale to one with periods for decimal separators, such as en_US, should solve the problem.

@robocoder
Copy link
Collaborator

Fixed in fe53bc8

@howard
Copy link

howard commented May 31, 2015

Changing the global locale seems dangerous, as it affects code outside this library. How about setting the locale when necessary, and resetting the default afterwards?

setlocale(LC_NUMERIC, 'C');
// Do all the number formatting.
setlocale(LC_NUMERIC, null);

@okj579
Copy link
Contributor

okj579 commented May 31, 2015

This particular change doesn't have that effect because it's in the pscss
executable. However it also doesn't solve the problem when using the
library API. An more robust solution would be to use number_format() and
not rely on the locale at all.

And yes, I'm willing to implement that.

@robocoder
Copy link
Collaborator

Reverted. This was already fixed in a previous version.

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

No branches or pull requests

4 participants