Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!uni-erlangen.de!news-nue1.dfn.de!news-stu1.dfn.de!news.belwue.de!news.uni-stuttgart.de!news.urz.uni-heidelberg.de!not-for-mail
From: frank@see-my-sig.invalid (Frank Otto)
Newsgroups: rec.arts.int-fiction
Subject: Re: [Glk] Problems with german chars in Linux versions
Date: 27 Jun 2002 11:34:08 GMT
Organization: University of Heidelberg, Germany
Lines: 50
Message-ID: <slrnahlu1g.e29.frank@goedel.pci.uni-heidelberg.de>
References: <m37kl2oitm.fsf@frob.de>
NNTP-Posting-Host: goedel.pci.uni-heidelberg.de
X-Trace: news.urz.uni-heidelberg.de 1025177647 26306 129.206.21.129 (27 Jun 2002 11:34:08 GMT)
X-Complaints-To: usenet@news.urz.uni-heidelberg.de
NNTP-Posting-Date: 27 Jun 2002 11:34:08 GMT
User-Agent: slrn/0.9.7.1 (Linux)
Xref: news.duke.edu rec.arts.int-fiction:105492

Hi there,

It looks like Frank Borger <spam@frob.de> wrote:
:
: Glulxe for Linux (3.5) with _XGlk_ (0.4.11) displays the german chars
: correctly but does not accept them (and apparently no other character
: above A0h) in the player's input (it displays and reads a blank
: instead).
:
:
: Q: Can XGlk be fixed to accept chars>=A0h in input?  Hints, anyone?


A: Yes. Here's a patch:

------------------------------------------------------------------------
diff -bur xglk/xg_win_textbuf.c xglk+hack/xg_win_textbuf.c
--- xglk/xg_win_textbuf.c	Thu Jun 27 00:10:36 2002
+++ xglk+hack/xg_win_textbuf.c	Thu Jun 27 02:27:50 2002
@@ -2392,7 +2392,7 @@
   char realch;

   /* ###### not perfect -- should be all typable chars */
-  if (ch < 32 || ch >= 127)
+  if (ch < 32 || (ch >= 127 && ch < 160) || ch > 255)
     ch = ' ';

   realch = ch;
diff -bur xglk/xg_win_textgrid.c xglk+hack/xg_win_textgrid.c
--- xglk/xg_win_textgrid.c	Sat Apr 15 20:56:45 2000
+++ xglk+hack/xg_win_textgrid.c	Thu Jun 27 02:28:30 2002
@@ -1353,7 +1353,7 @@
   int ix, pos;

   /* ### not perfect -- should be all typable chars */
-  if (ch < 32 || ch >= 127)
+  if (ch < 32 || (ch >= 127 && ch < 160) || ch > 255)
     ch = ' ';

   realch = ch;
------------------------------------------------------------------------

In the one case where I tested it, it worked. YMMV.

HTH,
Frank

--
Frank   Otto  pci   uni    heidelberg   de
     dot    at   dot   dash          dot
