Skip to content

Commit

Permalink
Reset locale after rendering
Browse files Browse the repository at this point in the history
Leaving locale as C breaks PDF export in Marker:
fabiocolacio/Marker#304 (comment)
  • Loading branch information
City-busz authored Jun 5, 2021
1 parent a0e6491 commit 63adcaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/svg.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ title_to_svg(char* buffer,
char *
chart_to_svg(chart* chart)
{
char * current = setlocale(LC_ALL, NULL);
setlocale(LC_ALL, "C");
char * buffer = malloc(1024*1024*sizeof(char));
memset(buffer, 0, 1024*1024);
Expand Down Expand Up @@ -737,6 +738,6 @@ chart_to_svg(chart* chart)
ticks_free(x_t);
ticks_free(y_t);

// setlocale(LC_ALL, "C");
setlocale(LC_ALL, current);
return buffer;
}

0 comments on commit 63adcaa

Please sign in to comment.