Skip to content

Commit c331713

Browse files
committed
fix mon_thousands_sep to be a space when the system returns 160 (unicode non-breaking space? e.g., Russian, Hungarian locales on Windows) or any other non-punctuation character
1 parent 35a5f5b commit c331713

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Interface/Text.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* You should have received a copy of the GNU General Public License
1717
* along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
1818
*/
19+
#include <cctype>
1920
#include "Text.h"
2021
#include <sstream>
2122
#include "../Engine/Font.h"
@@ -55,7 +56,7 @@ std::wstring Text::formatFunding(int funds)
5556
setlocale (LC_MONETARY,""); // see http://www.cplusplus.com/reference/clocale/localeconv/
5657
struct lconv * lc;
5758
lc=localeconv();
58-
std::wstring thousands_sep = Language::cpToWstr(lc->mon_thousands_sep);
59+
std::wstring thousands_sep = Language::cpToWstr(ispunct((unsigned char)*(lc->mon_thousands_sep)) ? lc->mon_decimal_point : " ");
5960

6061
bool negative = false;
6162
if (funds < 0)

0 commit comments

Comments
 (0)