This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Motif: UIL support for more Cyrillic locales

Hi All,

Motif's UIL compiler has long had an annoying problem: it often reports 
"$LANG contains an unknown character set" error message for syntactically correct *.uil files
(see <>,
more examples can be easily looked up).

The issue is caused by the fact that whenever an *.uil file doesn't declare its encoding explicitly,
UIL compiler assumes the encoding from the environment (namely, LANG variable). At the same time,
UIL doesn't rely on the underlying C library but rather maintains its own static list of supported encodings
(in tools/wml/motif.wml).

The above leads to inability to not only use UIL in certain locales,
but also build Motif itself (as UIL is bootstrapped and invoked during the build process).

Attached is the patch that fixes the problem for Cyrillic locales.
Support has been added for "ISO-8859-5" (LANG=ru_RU is currently valid, LANG=ru_RU.ISO-8859-5 is not),
"CP1251" and "IBM866" charsets.


diff --git a/tools/wml/motif.wml b/tools/wml/motif.wml
index 1ad79e9..397040e 100644
--- a/tools/wml/motif.wml
+++ b/tools/wml/motif.wml
@@ -93,7 +93,8 @@ CharacterSet
           Alias = "ISOLatin5";
           Alias = "88595"; };
-        { XmStringCharsetName = "ISO8859-5"; };
+        { XmStringCharsetName = "ISO8859-5";
+          Alias = "ISO-8859-5"; };
         { XmStringCharsetName = "ISO8859-6";
           Alias = "iso_latin6";
@@ -161,6 +162,17 @@ CharacterSet
                   Alias = "KOI8R";
                   Alias = "KOI8U";
                   Alias = "KOI8RU"; };
+    ansi_cyrillic
+                { XmStringCharsetName = "CP1251";
+                  Alias = "WINDOWS-1251";
+                  Alias = "ANSI-1251";
+                  ! The name of CP1251 in Solaris
+                  Alias = "ANSI1251"; };
+    dos_cyrillic
+                { XmStringCharsetName = "IBM866";
+                  Alias = "IBM-866";
+                  Alias = "CP866";
+                  Alias = "866"; };
         { FontListElementTag = XmFONTLIST_DEFAULT_TAG; };

Attachment: signature.asc
Description: OpenPGP digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]