summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-11-13 12:52:13 +0000
committerSimon Tatham <anakin@pobox.com>2005-11-13 12:52:13 +0000
commitc1a1cd703d8eb64a0631ff27ba1072c0aa8e1852 (patch)
tree187950abb12d366acd339272c9ba93c6cb0d24c6 /main.c
parent78745626246540d77926a318562a62e14398e125 (diff)
downloadhalibut-c1a1cd703d8eb64a0631ff27ba1072c0aa8e1852.zip
halibut-c1a1cd703d8eb64a0631ff27ba1072c0aa8e1852.tar.gz
halibut-c1a1cd703d8eb64a0631ff27ba1072c0aa8e1852.tar.bz2
halibut-c1a1cd703d8eb64a0631ff27ba1072c0aa8e1852.tar.xz
Revert to "C" locale for LC_NUMERIC, so that PDFs won't be corrupted
by the use of a comma as a decimal separator. [originally from svn r6456]
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.c b/main.c
index 4304c7c..eb95fc3 100644
--- a/main.c
+++ b/main.c
@@ -50,7 +50,16 @@ int main(int argc, char **argv) {
paragraph *cfg, *cfg_tail;
void *pre_backend_data[16];
+ /*
+ * Use the specified locale everywhere. It'll be used for
+ * output of error messages, and as the default character set
+ * for input files if one is not explicitly specified.
+ *
+ * However, we need to use standard numeric formatting for
+ * output of things like PDF.
+ */
setlocale(LC_ALL, "");
+ setlocale(LC_NUMERIC, "C");
/*
* Set up initial (default) parameters.