Lars,

is there any particular reason why you used a separate definition of codeset
in the messages files? Shouldn't we use only one, as in the attached patch?


Georg
Index: src/client/messages.C
===================================================================
--- src/client/messages.C	(Revision 17392)
+++ src/client/messages.C	(Arbeitskopie)
@@ -13,6 +13,7 @@
 #include "debug.h"
 #include "support/filetools.h"
 #include "support/package.h"
+#include "support/unicode.h"
 
 #include <boost/current_function.hpp>
 
@@ -122,16 +123,11 @@ public:
 				<< "Rtn value : " << c << endl;
 		}
 
-#ifdef WORDS_BIGENDIAN
-		static const char * codeset = "UCS-4BE";
-#else
-		static const char * codeset = "UCS-4LE";
-#endif
-		if (!bind_textdomain_codeset(PACKAGE, codeset)) {
+		if (!bind_textdomain_codeset(PACKAGE, ucs4_codeset)) {
 			lyxerr[Debug::DEBUG]
 				<< BOOST_CURRENT_FUNCTION << '\n'
 				<< "Error code: " << errno << '\n'
-				<< "Codeset   : " << codeset << '\n'
+				<< "Codeset   : " << ucs4_codeset << '\n'
 				<< endl;
 		}
 
Index: src/messages.C
===================================================================
--- src/messages.C	(Revision 17392)
+++ src/messages.C	(Arbeitskopie)
@@ -17,7 +17,7 @@
 #include "support/environment.h"
 #include "support/filetools.h"
 #include "support/package.h"
-#include "support/types.h"
+#include "support/unicode.h"
 
 #include <boost/current_function.hpp>
 #include <boost/regex.hpp>
@@ -52,12 +52,6 @@ using support::getEnv;
 using support::setEnv;
 
 
-#ifdef WORDS_BIGENDIAN
-		char const * codeset = "UCS-4BE";
-#else
-		char const * codeset = "UCS-4LE";
-#endif
-
 // This version use the traditional gettext.
 Messages::Messages(string const & l)
 	: lang_(l), warned_(false)
@@ -129,11 +123,11 @@ docstring const Messages::get(string con
 			<< "Rtn value : " << c << endl;
 	}
 
-	if (!bind_textdomain_codeset(PACKAGE, codeset)) {
+	if (!bind_textdomain_codeset(PACKAGE, ucs4_codeset)) {
 		lyxerr[Debug::DEBUG]
 		<< BOOST_CURRENT_FUNCTION << '\n'
 			<< "Error code: " << errno << '\n'
-			<< "Codeset   : " << codeset << '\n'
+			<< "Codeset   : " << ucs4_codeset << '\n'
 			<< endl;
 	}
 

Reply via email to