public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Motif: UIL support for more Cyrillic locales
@ 2016-02-19  9:47 Andrey ``Bass'' Shcheglov
  0 siblings, 0 replies; only message in thread
From: Andrey ``Bass'' Shcheglov @ 2016-02-19  9:47 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 1025 bytes --]

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 <https://motif.ics.com/forum/comp-error-lang-contains-unknown>,
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.

Regards,
Andrey.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: openmotif-uil.patch --]
[-- Type: text/x-patch; name="openmotif-uil.patch", Size: 1168 bytes --]

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"; };
     iso_cyrillic
-        { XmStringCharsetName = "ISO8859-5"; };
+        { XmStringCharsetName = "ISO8859-5";
+          Alias = "ISO-8859-5"; };
     iso_arabic
         { 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"; };
     XmFONTLIST_DEFAULT_TAG
         { FontListElementTag = XmFONTLIST_DEFAULT_TAG; };
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-19  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-19  9:47 Motif: UIL support for more Cyrillic locales Andrey ``Bass'' Shcheglov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).