[rkward-cvs] SF.net SVN: rkward:[3389] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Jan 26 14:38:41 UTC 2011


Revision: 3389
          http://rkward.svn.sourceforge.net/rkward/?rev=3389&view=rev
Author:   tfry
Date:     2011-01-26 14:38:41 +0000 (Wed, 26 Jan 2011)

Log Message:
-----------
Fix locale bug that make pdf() and postscript() malfunction on Windows

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/rbackend/rkrbackend.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2011-01-26 12:19:24 UTC (rev 3388)
+++ trunk/rkward/ChangeLog	2011-01-26 14:38:41 UTC (rev 3389)
@@ -1,3 +1,4 @@
+- Fixed: On Windows, a wrong locale for LC_NUMERIC would be applied, resulting in malfunction of pdf() and postscript()
 - Fixed: Did not use system configured background color in data editor
 - Fixed: New columns would be always be added to the right, instead of to the left, in the data editor
 - Fixed: Would crash when trying to edit 0 row data.frame

Modified: trunk/rkward/rkward/rbackend/rkrbackend.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rkrbackend.cpp	2011-01-26 12:19:24 UTC (rev 3388)
+++ trunk/rkward/rkward/rbackend/rkrbackend.cpp	2011-01-26 14:38:41 UTC (rev 3389)
@@ -20,6 +20,7 @@
 #ifdef Q_WS_WIN
 #	include <windows.h>
 #	include <winsock2.h>
+#	include <locale.h>
 #	undef ERROR 	// clashes with R
 #	define Win32	// needed for R includes
 #else
@@ -888,6 +889,8 @@
 #ifndef Q_WS_WIN
 	// on windows, set in connectCallbacks() for technical reasons
 	R_Interactive = (Rboolean) TRUE;
+#else
+	setlocale (LC_NUMERIC, "C");	// something appears to mess with the locale on Windows. R will not work correctly without LC_NUMERIC=C
 #endif
 
 	RBackendRequest req (false, RBackendRequest::SetParamsFromBackend);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list