- uri = g_strdup_printf(GEONAMES_WIKIPEDIA_URL_FMT, maxmin[0].lat, maxmin[1].lat, maxmin[0].lon, maxmin[1].lon);
+ /* encode doubles in a C locale */
+ gchar *north = a_coords_dtostr(maxmin[0].lat);
+ gchar *south = a_coords_dtostr(maxmin[1].lat);
+ gchar *east = a_coords_dtostr(maxmin[0].lon);
+ gchar *west = a_coords_dtostr(maxmin[1].lon);
+ uri = g_strdup_printf(GEONAMES_WIKIPEDIA_URL_FMT, north, south, east, west);
+ g_free(north); north = NULL;
+ g_free(south); south = NULL;
+ g_free(east); east = NULL;
+ g_free(west); west = NULL;