From 98f6c00dad96d3150a9b969a0ee67addc78ac5f0 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 21 Oct 2020 15:29:28 -0400 Subject: Protect numeric conversion against user's locale (fixes #459) --- README-maintainer | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'README-maintainer') 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 -- cgit v1.2.3-70-g09d2