diff --git a/src/svg.c b/src/svg.c index 9e94a58..7a833d4 100644 --- a/src/svg.c +++ b/src/svg.c @@ -706,7 +706,8 @@ title_to_svg(char* buffer, char * chart_to_svg(chart* chart) { - setlocale(LC_ALL, "C"); + char * current = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); char * buffer = malloc(1024*1024*sizeof(char)); memset(buffer, 0, 1024*1024); svg_header(buffer, chart->width, chart->height); @@ -737,6 +738,6 @@ chart_to_svg(chart* chart) ticks_free(x_t); ticks_free(y_t); - // setlocale(LC_ALL, "C"); + setlocale(LC_NUMERIC, current); return buffer; }