Hi,<br><br>While testing evolution-data-server / libical on a Linux system with the locale set to "fr_FR.utf8", I noticed that the floating point values were being saved incorrectly in the the VEVENT.<br>They would look like "GEO:10\,000000\;11\,000000" instead of "GEO:10.000000\;11.000000".<br>
<br>After looking at the code of libical, I identified the root cause in libical/icalvalue.c:<br>icalvalue_float_as_ical_string_r() and icalvalue_geo_as_ical_string_r() are using snprintf to convert the float values into strings.<br>
<br>However, according to the snprintf man page:<br>"""<br>For some numeric conversions a radix character ("decimal point") or 
thousands' grouping character is used. The actual character used depends
 on the LC_NUMERIC part of the locale. The POSIX locale uses '.' as 
radix character, and does not have a grouping character. Thus,<br>
<br>
    printf("%'.2f", 1234567.89);<br>
<br>
results in "1234567.89" in the POSIX locale, in "1234567,89" in the nl_NL locale, and in "1.234.567,89" in the da_DK locale. <br>"""<br><br>I have libical 0.46 on my test system but this part of the code seems to be the same in svn trunk.<br>
<br>I believe that another function than snprintf should be used to convert the values, one that is not locale-aware. Alternatively, it is possible to change the locale to "C" before the snprintf() call and restore the locale after (see attached patch).<br>
The second solution seems to be used in inkscape for example (<a href="http://inkscape.sourcearchive.com/documentation/0.46-9ubuntu1/util_2units_8cpp-source.html">http://inkscape.sourcearchive.com/documentation/0.46-9ubuntu1/util_2units_8cpp-source.html</a>). This, however, is probably not thread-safe.<br>
<br>Bug report:<br><a href="https://sourceforge.net/tracker/index.php?func=detail&aid=3493034&group_id=16077&atid=116077">https://sourceforge.net/tracker/index.php?func=detail&aid=3493034&group_id=16077&atid=116077</a><br>
<br clear="all">Kr,<br>-- <br>Christophe Dumez<br>Linux Software Engineer, PhD<br>Intel Finland Oy - Open Source Technology Center<br><br>