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

fromFloat: Ensure dot as decimal point. #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apapsch
Copy link

@apapsch apapsch commented Jan 28, 2020

String conversion is locale aware, because its primary use case
is for display purposes. This hack assumes that the only other
decimal point is a comma, which gets replaced by dot.

Alternatively, locale could be set to C before conversion and
restored after conversion, although this might incur an
performance penalty, because setlocale does I/O.

String conversion is locale aware, because its primary use case
is for display purposes. This hack assumes that the only other
decimal point is a comma, which gets replaced by dot.

Alternatively, locale could be set to C before conversion and
restored after conversion, although this might incur an
performance penalty, because setlocale does I/O.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant