Subject: [clisp-list] Unicode question

From: "Keith Morgan" <[email-masked]>
Date: Tue Dec 3 09:35:02 2002

I am considering using clisp on Windows but Unicode support is critical
to me and I have a question I haven't been able to resolve via FAQ.

In Windows I can switch my keyboard mapping between two languages (e.g.
English and Hindi), and most programs, such as Notepad, will render the
resulting mixed-language text correctly. I can save a Notepad file in
Unicode format and reopen it in Notepad or Word and both programs render
the file correctly.

I'm looking for a way to get clisp to behave like this. In particular, I
want a way to switch the mode of the evaluator (listener) so that I can
type Unicode symbols directly and get them to render correctly. For
example I want (setq x '<Hindi word>) to render correctly when entered
from the keyboard, and when read from a dribbled file and printed. Is
this possible?

Thanks,
Keith Morgan

---

From: Sam Steingold <[email-masked]>
Date: Tue Dec 3 09:52:03 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Unicode question"
> * Sent on Tue, 3 Dec 2002 11:33:09 -0600
> * Honorable "Keith Morgan" <[email-masked]> writes:
>
> In Windows I can switch my keyboard mapping between two languages
> (e.g.  English and Hindi), and most programs, such as Notepad, will
> render the resulting mixed-language text correctly. I can save a
> Notepad file in Unicode format and reopen it in Notepad or Word and
> both programs render the file correctly.
> 
> I'm looking for a way to get clisp to behave like this. In particular,
> I want a way to switch the mode of the evaluator (listener) so that I
> can type Unicode symbols directly and get them to render
> correctly. For example I want (setq x '<Hindi word>) to render
> correctly when entered from the keyboard, and when read from a
> dribbled file and printed. Is this possible?

CLISP offers full support of UNICODE 3.2.

CLISP does not render anything though, this is done by the terminal
application where you started CLISP (be it dos/cmd window or Emacs
buffer).

if (setq x '<Hindi word>) does not work as you expect it to, this is
almost certainly caused by the terminal you are using.

See <http://clisp.cons.org/propaganda.html#unicode> and
<http://clisp.cons.org/impnotes/characters.html> for more details.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
If you're passed on the right, you're in the wrong lane.

---

From: "Keith Morgan" <[email-masked]>
Date: Thu Dec 5 09:22:07 2002

It sounds like I would have to wire clisp into a real Windows interface
instead of using the Dos/command line terminal, since Dos windows never
render Unicode correctly, even when using wprintf(), etc. The usual
problem with lisp is that it likes to call out, but not be called by
native code (e.g. Windows event methods). Do you know if anyone has
worked on wiring a clisp r-e-p loop into a Windows interface? Thanks.

Keith Morgan

> -----Original Message-----
> From: Sam Steingold [mailto:[email-masked]] 
> Sent: Tuesday, December 03, 2002 11:53 AM
> To: Keith Morgan
> Cc: [email-masked]
> Subject: Re: [clisp-list] Unicode question
> 
> 
> > can type Unicode symbols directly and get them to render correctly. 
> > For example I want (setq x '<Hindi word>) to render correctly when 
> > entered from the keyboard, and when read from a dribbled file and 
> > printed. Is this possible?
> 
> CLISP does not render anything though, this is done by the 
> terminal application where you started CLISP (be it dos/cmd 
> window or Emacs buffer).
> 
> if (setq x '<Hindi word>) does not work as you expect it to, 
> this is almost certainly caused by the terminal you are using.
> 
> <http://clisp.cons.org/impnotes/characters.htm> l> for more 
> details.
> 
> -- 
> Sam Steingold 
> (http://www.podval.org/~sds) running RedHat8 GNU/Linux 
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/>
<http://www.palestine-central.com/links.html>
If you're passed on the right, you're in the wrong lane.

---

From: Arseny Slobodjuck <[email-masked]>
Date: Fri Dec 6 00:06:05 2002

Hello Keith,

> worked on wiring a clisp r-e-p loop into a Windows interface? Thanks.

'Dos' (console window) can display some national codepage so clisp
with properly set up *terminal-encoding* should be able to map Unicode
to this codepage. I use Russian and English characters with CP866, there
are room for all of it. There will be a problem if I'll want to use
more languages simultaneosly. But while I fit in CP866 I'm ok. Is
there really no way to display Hindi characters in a console window
(without clisp) ?

>-------------------------------------------------------
>This SF.net email is sponsored by: Microsoft Visual Studio.NET
>comprehensive development tool, built to increase your
>productivity. Try a free online hosted session at:

Hmmm.

-- 
Best regards,
 Arseny