M
Mathieu Malaterre
Hello,
I would like to have some advices on this problem I am having. In my
code I have hardcoded a string like:
const char foo[] = "11 0.438482 ";
I was then calling strtod to transform it back to double. Unfortunately
depending on the LOCALE settings, the strtod could fail.
Browsing through some previous post, it seems atof is not affected by
the LOCALE, correct ? Do you think this would be the correct approach to
solve my problem.
Is there a list of function that are affected by LOCALE and could fail
like strtod. My guess is that sscanf would fail the same way, but I
cannot think of any other function, where the dot versus comma would
change the behavior.
Thanks for any help
Mathieu
I would like to have some advices on this problem I am having. In my
code I have hardcoded a string like:
const char foo[] = "11 0.438482 ";
I was then calling strtod to transform it back to double. Unfortunately
depending on the LOCALE settings, the strtod could fail.
Browsing through some previous post, it seems atof is not affected by
the LOCALE, correct ? Do you think this would be the correct approach to
solve my problem.
Is there a list of function that are affected by LOCALE and could fail
like strtod. My guess is that sscanf would fail the same way, but I
cannot think of any other function, where the dot versus comma would
change the behavior.
Thanks for any help
Mathieu