From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: TUTORIAL.bg and windows-1251 Date: Wed, 26 Nov 2003 16:47:14 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200311260747.QAA27236@etlken.m17n.org> References: <3FB52552.6090302@fmi.uni-sofia.bg> <200311170721.QAA11735@etlken.m17n.org> <3FBA3F81.4010602@fmi.uni-sofia.bg> <200311242355.IAA24563@etlken.m17n.org> <3FC45367.6070504@fmi.uni-sofia.bg> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1069833521 27816 80.91.224.253 (26 Nov 2003 07:58:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Nov 2003 07:58:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Nov 26 08:58:29 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AOuZB-0001xx-00 for ; Wed, 26 Nov 2003 08:58:29 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AOuZB-0004tB-00 for ; Wed, 26 Nov 2003 08:58:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AOvU5-0000TF-SG for emacs-devel@quimby.gnus.org; Wed, 26 Nov 2003 03:57:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AOvTh-0000T8-Ue for emacs-devel@gnu.org; Wed, 26 Nov 2003 03:56:53 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AOvTA-0000Ap-Vn for emacs-devel@gnu.org; Wed, 26 Nov 2003 03:56:52 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AOvTA-0000Am-05 for emacs-devel@gnu.org; Wed, 26 Nov 2003 03:56:20 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/3.7W-20010518204228) with ESMTP id hAQ7lEh11554; Wed, 26 Nov 2003 16:47:14 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6/3.7W-20010823150639) with ESMTP id hAQ7lEs22291; Wed, 26 Nov 2003 16:47:14 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id QAA27236; Wed, 26 Nov 2003 16:47:14 +0900 (JST) Original-To: ogi@fmi.uni-sofia.bg In-reply-to: <3FC45367.6070504@fmi.uni-sofia.bg> (message from Ognyan Kulev on Wed, 26 Nov 2003 09:16:55 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18134 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18134 In article <3FC45367.6070504@fmi.uni-sofia.bg>, Ognyan Kulev writes: > Kenichi Handa wrote: >> In article <3FBA3F81.4010602@fmi.uni-sofia.bg>, Ognyan Kulev writes: >>> Can X encoding be adjusted? Isn't there only two choices for cyrillic: >>> iso10646-1 and iso8859-5? >> >> It seems that bg_BG locale of glibc, gtk, or XFree86 (I >> don't know which is responsible for) encodes cyrillic >> characters using extended segment with charset name >> "microsoft-cp1251" in selection. > Yes, CP1251 in Bulgaria is what is KOI8-R in Russia. Have you tested copy&paste of Cyrillic text between Emacs and the other applications (e.g. Mozilla)? Did it work well? >> Please try the attached file. It overrides the ctext >> encoder/decoder so that microsoft-cp1251 is used on decoding >> in Bulgarian lang. env. > After (use-microsoft-cp1251-font) in *scratch*, windows-1251 files are > displayed correctly :-) > Is it problem if this function is always evaled when Emacs is started? > One can want to view windows-1251 encoded file without being in > Bulgarian language environment. Will this case be resolved? But, if he is not in a lang. env. that mainly uses windows-1251, I think we can't assume that he want to see them in microsoft-cp1251 font. I think the possibility that he has iso10646 font is higher. By the way, I'm now designing a facility to use microsoft-cp1251 for Cyrillic characters automatically in Bulgarian lang. env. by implementing something like this. ------------------------------------------------------------ set-overriding-fontspec-internal is a built-in function. Internal use only. FONTLIST is an alist of TARGET vs FONTNAME, where TARGET is a charset or a char-table, FONTNAME have the same meanings as in `set-fontset-font'. It overrides the font specifications for each TARGET in the default fontset by the corresponding FONTNAME. If TARGET is a charset, targets are all characters in the charset. If TARGET is a char-table, targets are characters whose value is non-nil in the table. It is intended that this function is called only from `set-language-environment'. ------------------------------------------------------------ Such lang. env. as Bulgarian will have `overrinding-fontset' property whose value is used as an argument to the above function. It's a lightweight method that overrides the default fontset but can be cancelled easily when we switch to the other lang. env. --- Ken'ichi HANDA handa@m17n.org