Changeset 2116
- Timestamp:
- 06/16/09 11:52:29 (15 months ago)
- Location:
- trunk/slv2/src
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/slv2/src/query.c
r2086 r2116 146 146 } 147 147 148 // Reset numeric locale to correctly interpret turtle numeric constants149 char* locale = strdup(setlocale(LC_NUMERIC, NULL));150 setlocale(LC_NUMERIC, "POSIX");151 152 148 librdf_query_results* results = librdf_query_execute(query, plugin->rdf); 153 154 // Restore numeric locale155 setlocale(LC_NUMERIC, locale);156 157 free(locale);158 149 159 150 librdf_free_query(query); -
trunk/slv2/src/scalepoint.c
r2007 r2116 22 22 #include <string.h> 23 23 #include <assert.h> 24 #include <locale.h>25 24 #include <raptor.h> 26 25 #include "slv2/types.h" -
trunk/slv2/src/value.c
r2086 r2116 33 33 slv2_value_set_numerics_from_string(SLV2Value val) 34 34 { 35 // FIXME: locale kludge s to work around librdf bug35 // FIXME: locale kludge, need a locale independent strtol and strtod 36 36 char* locale = strdup(setlocale(LC_NUMERIC, NULL)); 37 37 … … 228 228 size_t len = 0; 229 229 char* result = NULL; 230 char* locale = strdup(setlocale(LC_NUMERIC, NULL)); 231 232 // FIXME: locale kludges to work around librdf bug 230 char* locale = NULL; 233 231 234 232 switch (value->type) { … … 244 242 case SLV2_VALUE_INT: 245 243 // INT64_MAX is 9223372036854775807 (19 digits) + 1 for sign 244 // FIXME: locale kludge, need a locale independent snprintf 245 locale = strdup(setlocale(LC_NUMERIC, NULL)); 246 246 len = 20; 247 247 result = calloc(len, sizeof(char)); … … 251 251 break; 252 252 case SLV2_VALUE_FLOAT: 253 // FIXME: locale kludge, need a locale independent snprintf 254 locale = strdup(setlocale(LC_NUMERIC, NULL)); 253 255 len = 20; // FIXME: proper maximum value? 254 256 result = calloc(len, sizeof(char));
