aboutsummaryrefslogtreecommitdiffstats
path: root/README-maintainer
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-10-21 21:29:28 +0200
committerJay Berkenbilt <ejb@ql.org>2020-10-21 22:42:51 +0200
commit98f6c00dad96d3150a9b969a0ee67addc78ac5f0 (patch)
tree2c1455f3b208275aecc1395453f3396a85eb7800 /README-maintainer
parentef127001b36b42042874812e0d06dccf92cdb229 (diff)
downloadqpdf-98f6c00dad96d3150a9b969a0ee67addc78ac5f0.tar.zst
Protect numeric conversion against user's locale (fixes #459)
Diffstat (limited to 'README-maintainer')
-rw-r--r--README-maintainer8
1 files changed, 8 insertions, 0 deletions
diff --git a/README-maintainer b/README-maintainer
index 32577195..049d4c33 100644
--- a/README-maintainer
+++ b/README-maintainer
@@ -83,6 +83,14 @@ CODING RULES
* Use QIntC for type conversions -- see casting policy in docs.
+* Remember to imbue ostringstreams with std::locale::classic() before
+ outputting numbers. This protects against the user's global locale
+ altering otherwise deterministic values. (See github issue #459.)
+ One could argue that error messages containing numbers should
+ respect the user's locale, but I think it's more important for
+ output to be consistent, since the messages in question are not
+ really targetted at the end user.
+
* Use QPDF_DLL on all methods that are to be exported in the shared
library/DLL. Use QPDF_DLL_CLASS for all classes whose type
information is needed. This is important for exception classes and