Skip to content

fix: Support for locales using decimal separators other than . (dot)#372

Merged
ezyang merged 4 commits intoezyang:masterfrom
cracksalad:dev-master
Apr 30, 2023
Merged

fix: Support for locales using decimal separators other than . (dot)#372
ezyang merged 4 commits intoezyang:masterfrom
cracksalad:dev-master

Conversation

@cracksalad
Copy link
Copy Markdown
Contributor

When using somtehing like setlocale(LC_ALL, 'de_DE'); the function sprintf('%.1f, ...)' will use a comma for decimal separation. The function is_numeric() will output false for strings containing a comma. Thereby I had to replace the decimal separator of the used locale with a dot.

@cracksalad cracksalad changed the title Support for locales using decimal separators other than . (dot) fix: Support for locales using decimal separators other than . (dot) Apr 27, 2023
@ezyang
Copy link
Copy Markdown
Owner

ezyang commented Apr 28, 2023

Can we use number_format instead?

@cracksalad
Copy link
Copy Markdown
Contributor Author

Can we use number_format instead?

You are totally right. number_format is a much easier solution. I adjusted it.

@ezyang ezyang merged commit 43f49ac into ezyang:master Apr 30, 2023
github-actions Bot pushed a commit that referenced this pull request Nov 17, 2023
# [4.17.0](v4.16.0...v4.17.0) (2023-11-17)

### Bug Fixes

* CSSTidy ImportantComments not handled properly ([#359](#359)) ([78a9b4d](78a9b4d))
* fix CI ([#361](#361)) ([9ec687c](9ec687c))
* Invalid scheme check in Attr.TargetBlank ([#363](#363)) ([0176ef4](0176ef4))
* semantic release ([#339](#339)) ([d82f3d9](d82f3d9))
* semantic release ([#341](#341)) ([e55fead](e55fead)), closes [#339](#339)
* Support for locales using decimal separators other than . (dot) ([#372](#372)) ([43f49ac](43f49ac))

### Features

* Add support for all text-decoration properties ([#360](#360)) ([2d775c0](2d775c0))
* Allows commas to be included in tel URI ([#389](#389)) ([ec92490](ec92490)), closes [#388](#388)

### Reverts

* Revert "fix: semantic release (#339)" (#340) ([3e83215](3e83215)), closes [#339](#339) [#340](#340)
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 4.17.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants