public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey ``Bass'' Shcheglov <andrewbass@gmail.com>
To: cygwin@cygwin.com
Subject: Motif: UIL support for more Cyrillic locales
Date: Fri, 19 Feb 2016 09:47:00 -0000	[thread overview]
Message-ID: <56C6E4A9.7020804@gmail.com> (raw)


[-- 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 --]

                 reply	other threads:[~2016-02-19  9:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C6E4A9.7020804@gmail.com \
    --to=andrewbass@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).