From owner-ntemacs-users@cs.washington.edu  Fri Aug  1 04:57:21 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" " 1" "August" "1997" "12:22:49" "+0100" "Andrew Innes" "andrewi@harlequin.co.uk" nil "43" "Re: Cyrillic characters???" "^From:" nil nil "8" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id EAA25948 for <voelker@june.cs.washington.edu>; Fri, 1 Aug 1997 04:57:21 -0700
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id EAA37177 for <voelker@joker.cs.washington.edu>; Fri, 1 Aug 1997 04:57:19 -0700
Received: (majordom@localhost) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) id EAA01903 for ntemacs-users-outgoing; Fri, 1 Aug 1997 04:23:51 -0700 (PDT)
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id EAA01899 for <ntemacs-users@trout.cs.washington.edu>; Fri, 1 Aug 1997 04:23:48 -0700 (PDT)
Received: from holly.cam.harlequin.co.uk (holly.cam.harlequin.co.uk [193.128.4.58]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id EAA25398 for <ntemacs-users@cs.washington.edu>; Fri, 1 Aug 1997 04:23:41 -0700
Received: from propos.long.harlequin.co.uk (propos.long.harlequin.co.uk [193.128.93.50])           by holly.cam.harlequin.co.uk (8.8.4/8.8.4) with ESMTP 	  id MAA27995; Fri, 1 Aug 1997 12:23:23 +0100 (BST)
Received: from woozle.long.harlequin.co.uk (woozle.long.harlequin.co.uk [193.128.93.77]) by propos.long.harlequin.co.uk (8.8.4/8.6.12) with SMTP id MAA24967; Fri, 1 Aug 1997 12:22:49 +0100 (BST)
Message-Id: <199708011122.MAA24967@propos.long.harlequin.co.uk>
In-reply-to: <01BC9DD8.14CC95A0.dyaitskov@insystems.com> (message from Dmitry 	Yaitskov on Thu, 31 Jul 1997 17:35:03 -0400)
Precedence: bulk
From: Andrew Innes <andrewi@harlequin.co.uk>
Sender: owner-ntemacs-users@cs.washington.edu
To: dyaitskov@insystems.com
CC: ntemacs-users@cs.washington.edu
Subject: Re: Cyrillic characters???
Date: Fri, 1 Aug 1997 12:22:49 +0100 (BST)

On Thu, 31 Jul 1997 17:35:03 -0400, Dmitry Yaitskov <dyaitskov@insystems.com> said:
>Hi,
>
>I am using emacs for NT 19.34.4, and all works well except that I cannot 
>display Cyrillic characters in emacs. I am running NT 4 (sp3), and have 
>Russian input locale installed - so that I can type in Russian in many 
>Windows applications (e.g. MS Mail, MS Word, some 16-bit apps even). But if I 
>try to type something in Russian in emacs all I get is ? (question marks). 
>What am I doing wrong? I *have* tried to
>
>(standard-display-european 1)
>
>and
>
>(standard-display-8bit 128 255)
>
>to no avail - it didn't change anything. Changing fonts also does not help.

As well as doing M-x standard-display-european (which just enables chars
greater than 127 to be displayed as themselves rather than in octal
format), you also need to select a font using Cyrillic encoding.

On my system, Lucida Console supports Cyrillic encoding; if I do
S-mouse-1 to get the font selection dialog, I select Lucida Console and
change the "Script" setting from Western to Cyrillic.  This displays
Cyrillic characters for me.

The same applies for the other script settings listed on my system for
Lucida Console - Greek, Turkish, Central European and Cyrillic.
Depending on the fonts installed on your system there may be other
choices.

---

If you have selected a Cyrillic font, then the problem is presumably to
do with inputting Cyrillic characters.  To get question marks displayed
suggests either that the font being used doesn't have the correct gylphs
or that the character you typed was mapped to a real question mark.  You
can tell which it is by positioning the cursor over one of these
characters and typing `C-x =' - this will display the hex value of the
character, which is 0x3f for a real question mark.

AndrewI

From owner-ntemacs-users@cs.washington.edu  Fri Aug  1 10:23:11 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" " 1" "August" "1997" "12:42:38" "-0400" "Dmitry Yaitskov" "dima@interlog.com" nil "21" "RE: Cyrillic characters???" "^From:" nil nil "8" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id KAA11447 for <voelker@june.cs.washington.edu>; Fri, 1 Aug 1997 10:23:10 -0700
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id KAA41447 for <voelker@joker.cs.washington.edu>; Fri, 1 Aug 1997 10:23:09 -0700
Received: (majordom@localhost) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) id JAA04580 for ntemacs-users-outgoing; Fri, 1 Aug 1997 09:43:38 -0700 (PDT)
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id JAA04574 for <ntemacs-users@trout.cs.washington.edu>; Fri, 1 Aug 1997 09:43:35 -0700 (PDT)
Received: from blackhole.pritel.net (hole2.pritel.net [198.235.13.7]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id JAA08680 for <ntemacs-users@cs.washington.edu>; Fri, 1 Aug 1997 09:43:19 -0700
Received: from [192.168.9.244] ([192.168.9.244]) 	by blackhole with SMTP (DuhMail/3.0) 	id MAA17912; Fri, 1 Aug 1997 12:35:17 -0400
X-Authentication-Warning: blackhole: Host [192.168.9.244] claimed to be dima
Received: by localhost with Microsoft MAPI; Fri, 1 Aug 1997 12:43:11 -0400
Message-ID: <01BC9E78.78783820.dima@interlog.com>
Organization: sam po sebe
X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211
Precedence: bulk
From: Dmitry Yaitskov <dima@interlog.com>
Sender: owner-ntemacs-users@cs.washington.edu
To: "'Andrew Innes'" <andrewi@harlequin.co.uk>
Cc: "ntemacs-users@cs.washington.edu" <ntemacs-users@cs.washington.edu>
Subject: RE: Cyrillic characters???
Date: Fri, 1 Aug 1997 12:42:38 -0400

On Friday, August 01, 1997 7:23 AM, Andrew Innes 
[SMTP:andrewi@harlequin.co.uk] wrote:
> If you have selected a Cyrillic font, then the problem is presumably to
> do with inputting Cyrillic characters.  To get question marks displayed
> suggests either that the font being used doesn't have the correct gylphs
> or that the character you typed was mapped to a real question mark.  You
> can tell which it is by positioning the cursor over one of these
> characters and typing `C-x =' - this will display the hex value of the
> character, which is 0x3f for a real question mark.

Thanks for advice. I checked and yes - the problem *is* with input. If I open 
a file that contains Cyrillic in it already, I can see it. But if I type or 
paste Cyrillic chars - I get real question marks... But why? What can I do to 
fix it? It happens even if I remove my .emacs file - what else should I 
check?

Thanks again.

--
Cheers,
 -Dima.

From owner-ntemacs-users@cs.washington.edu  Tue Sep  2 08:40:32 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Tue" " 2" "September" "1997" "16:01:19" "+0100" "Andrew Innes" "andrewi@harlequin.co.uk" nil "85" "Re: Cyrillic mode under NT Emacs" "^From:" nil nil "9" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id IAA13513 for <voelker@june.cs.washington.edu>; Tue, 2 Sep 1997 08:40:32 -0700
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id IAA25673 for <voelker@joker.cs.washington.edu>; Tue, 2 Sep 1997 08:40:31 -0700
Received: (majordom@localhost) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) id IAA14389 for ntemacs-users-outgoing; Tue, 2 Sep 1997 08:02:14 -0700 (PDT)
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id IAA14385 for <ntemacs-users@trout.cs.washington.edu>; Tue, 2 Sep 1997 08:02:11 -0700 (PDT)
Received: from holly.cam.harlequin.co.uk (holly.cam.harlequin.co.uk [193.128.4.58]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id IAA11267 for <ntemacs-users@cs.washington.edu>; Tue, 2 Sep 1997 08:02:07 -0700
Received: from propos.long.harlequin.co.uk (propos.long.harlequin.co.uk [193.128.93.50])           by holly.cam.harlequin.co.uk (8.8.4/8.8.4) with ESMTP 	  id QAA25927; Tue, 2 Sep 1997 16:01:53 +0100 (BST)
Received: from wibble.long.harlequin.co.uk (wibble.long.harlequin.co.uk [193.128.93.135]) by propos.long.harlequin.co.uk (8.8.4/8.6.12) with SMTP id QAA05772; Tue, 2 Sep 1997 16:01:19 +0100 (BST)
Message-Id: <199709021501.QAA05772@propos.long.harlequin.co.uk>
In-reply-to: <3405ED64.92C91BD1@cs6200-doct.sdsc.edu> 	(kdelia@cs6200-doct.sdsc.edu)
Precedence: bulk
From: Andrew Innes <andrewi@harlequin.co.uk>
Sender: owner-ntemacs-users@cs.washington.edu
To: kdelia@cs6200-doct.sdsc.edu
CC: ntemacs-users@cs.washington.edu
Subject: Re: Cyrillic mode under NT Emacs
Date: Tue, 2 Sep 1997 16:01:19 +0100 (BST)

On Thu, 28 Aug 1997 17:28:04 -0400, "Kevin D'Elia" <kdelia@cs6200-doct.sdsc.edu> said:
>Hello,
>
>    I've seen this question answered before, so I'm hoping that someone
>can help me with it now.  I have input locale set to Russian and I can
>type Cyrillic characters in WordPad, NotePad, etc.  But Emacs displays
>???s.  What do I have to set in my .emacs to allow the entry of
>Cyrillic?  I am using 34.1.  Thanks in advance to all who respond...

As I understand it, this problem stems from the fact that you are
running on a non-Russian version of Windows (so the default locale does
not use a codepage that contains Cyrillic characters).  Although you can
select a Russian keyboard layout, Emacs cannot receive those characters
because it is expecting characters in the default ANSI codepage for the
system locale.

As a temporary measure, you can try changing the system locale in the
Regional Settings section of Control Panel.  I haven't tried this
myself, but it should allow Emacs to receive Cyrillic characters.

As a start towards providing a proper fix, I've added some basic support
functions to 19.34.5 to allow inspecting and changing the locale Emacs
operates in (independent of the system locale).  The functions are

  win32-set-current-locale
  win32-get-default-locale-id
  win32-get-current-locale-id
  win32-get-locale-info

Unfortunately I was rather rushed at the time, so I didn't have time to
implement the rather useful function `win32-locale-ids', which would
return a list of the supported locale-ids.  If 19.34.5 hasn't been
released yet (I gather not) then I'll get that added for the release -
it will then be possible to knock up some simple lisp functions to allow
the user to select the desired locale using either the standard three
letter language/region codes, or the long name form supported by
Windows.

To give a taste of what it to come, I've appended a small bit of lisp I
knocked up to test this.  You can call win32-list-locales to find out
the locale id (LCID - a 16-bit number) for the locale you want to use,
and then put (win32-set-current-locale LCID) in your .emacs if you want
to use that locale all the time.

I would appreciate it if someone could test this, to verify that you can
indeed enter Cyrillic characters (for instance) using the Russian
keyboard layout once you've set the locale to 1049 (the id for Russian).

Thanks,
AndrewI

-----------------------------------------------------------------
(defvar win32-known-locales nil
  "List of locale ids known to be supported.")

(defun win32-locale-ids ()
  "Return list of all supported locale ids."
  (let ((i 65535)
	locales)
    (while (> i 0)
      (if (win32-get-locale-info i)
	  (setq locales (cons i locales)))
      (setq i (1- i)))
    locales))

(defun win32-list-locales ()
  "List the supported locales."
  (interactive)
  (if (null win32-known-locales)
      (setq win32-known-locales (win32-locale-ids)))
  (switch-to-buffer-other-window (get-buffer-create "*Locales*"))
  (erase-buffer)
  (insert "Known locales:\n\nLCID\tShort\tLong\n\n")
  (insert (mapconcat
	   '(lambda (x)
	      (format "%d\t%s\t%s"
		      x
		      (win32-get-locale-info x)
		      (win32-get-locale-info x t)))
	   win32-known-locales "\n"))
  (insert "\n")
  (goto-char (point-min)))
-----------------------------------------------------------------

AndrewI

