Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

PHP setlocale changes parser output #22

Closed
Roope opened this issue Dec 19, 2013 · 5 comments
Closed

PHP setlocale changes parser output #22

Roope opened this issue Dec 19, 2013 · 5 comments

Comments

@Roope
Copy link

Roope commented Dec 19, 2013

Hello!

Found out (with percentage function) that decimal mark can change from point to comma. Here's a RTC:

setlocale(LC_ALL, 'fi_FI');

$less = new Less_Parser();

$less->parse("div { value: percentage(12.3 / 14.5); }");

echo $less->getCss();

output:

div { value: 84,82758620689656%; }
@oyejorge
Copy link
Owner

Of course, that makes perfect sense

@Roope
Copy link
Author

Roope commented Dec 20, 2013

Unvalid css makes no sense to me. I don't think users localization settings should be breaking it either. Can you please explain?

@oyejorge
Copy link
Owner

I don't think users localization settings should be breaking it either.

I agree. The compiler should output valid css no matter what the user's locale setting is. We just have to build it to check the user's locale and adjust as needed.

@oyejorge
Copy link
Owner

Should be all fixed with the latest beta release of 1.5.1

@Roope
Copy link
Author

Roope commented Dec 30, 2013

Thanks, much appreciated!

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

No branches or pull requests

2 participants