]> git.lyx.org Git - features.git/commitdiff
Use only one codeset definition
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 4 Mar 2007 13:04:18 +0000 (13:04 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 4 Mar 2007 13:04:18 +0000 (13:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17403 a592a061-630c-0410-9148-cb99ea01b6c8

src/client/messages.C
src/messages.C

index 0f140dcdba65685a298b5d8a6ba09c1419e81e42..6ec3716026d95d4cdd54ce1f7257607dbd1c5c1e 100644 (file)
@@ -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 3a628fe9bfdd62ae6acf9a35d49f6b7422173c74..d1f8381fb22809480b6afe383befccb49199a7fe 100644 (file)
@@ -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 const & m) const
                        << "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;
        }