damian-m-g / xlsx_drone

Fast Microsoft Excel's *.xlsx reader
MIT License
15 stars 4 forks source link

Parsing double and locale #5

Closed gvollant closed 1 year ago

gvollant commented 2 years ago

The function set_cell_data_values_for_number in xlsx_drone call strtod.

Unfortunatelly, on a french system (locale with "," and not "." as decimal separator) , only the integer porting is used.

pehaps _atof_l is the solution

gvollant commented 2 years ago

a solution can be using https://github.com/michael-hartmann/parsefloat @damian-m-g

damian-m-g commented 2 years ago

Thank you very much @gvollant for detecting this problem and for the suggestion.

I see some style-related issues (different style than the rest of the code) with the pull request, other than that, it could be good to go. Sadly, I don't have available time during these days to take a closer look and correct those few things, but I'll try on next weeks. Cheers.

gvollant commented 2 years ago

I made a new PR #10 (same code, but with function header documentation)

damian-m-g commented 1 year ago

PR was very useful, thank you for your insight. This issue has been fixed in 9a9db6edb36f900bf1ea761362f29a05f0c6ca10.