From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: need help in using a 10646 font with cp1251 text Date: Thu, 07 Aug 2003 20:18:16 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87y8y549sh.fsf@ID-87814.user.dfncis.de> References: <4nznimh6le.fsf@lockgroove.bwh.harvard.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1060281049 21268 80.91.224.253 (7 Aug 2003 18:30:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 7 Aug 2003 18:30:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 07 20:31:13 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19kpXd-00016Y-00 for ; Thu, 07 Aug 2003 20:31:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19kpXP-0006mB-29 for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Aug 2003 14:30:59 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.isc.org!sjc70.webusenet.com!chi1.webusenet.com!news.webusenet.com!snoopy.risq.qc.ca!in.100proofnews.com!in.100proofnews.com!fu-berlin.de!uni-berlin.de!dialin-145-254-195-078.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: dialin-145-254-195-078.arcor-ip.net (145.254.195.78) Original-X-Trace: news.uni-berlin.de 1060280861 30196839 145.254.195.78 (16 [87814]) X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6; Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:EJWBIDuxUtp/ib7kVjMXEHvaNwo= Original-Xref: shelby.stanford.edu gnu.emacs.help:115735 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11654 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11654 Eli Zaretskii writes: >> From: Ted Zlatanov >> Newsgroups: gnu.emacs.help >> Date: Wed, 06 Aug 2003 16:30:21 -0400 >> >> What can I do to get the 8859-5 charset obtained from the cp1251 >> encoding displayed as a UCS charset? I don't want to install a 8859-5 >> font. > > Try using code-pages.el. You didn't say what version of Emacs you > use, so I don't know whether it has code-pages.el bundled. If not, > you can find it either in the Emacs CVS or (I think) on > gnu.emacs.sources. I just ask out of curiosity: I don't know anything about cyrrillic, but from a quick glance it seems that the order of cyrillic characters is the same in UCS and in ISO 8859-5. So wouldn't it be an option to do some simple transposing for font encoding, like [only slightly tested]: (define-ccl-program tz-8859-5-to-ucs `(0 ;; In: r0 = charset-id; r1 = position code ;; Out: r1 = 1st octet; r2 = 2nd octet in UCS-2 as the font ;; encoding. ((if (r0 == ,(charset-id 'cyrillic-iso8859-5)) ;; Transpose chars from the cyrillic charset by #x3E0. ((r1 += #x3e0) (r2 = r1) (r1 = (r1 >> 8)) (r2 &= #xff)) ;; Everything else: business as usual. (call ccl-encode-unicode-font))))) (push '("ISO10646-1" . tz-8859-5-to-ucs) font-ccl-encoder-alist) (setq font-ccl-encoder-alist '(("ISO10646.*-*" . tz-8859-5-to-ucs))) (set-fontset-font "fontset-ADJUSTTHIS" 'cyrillic-iso8859-5 "-misc-fixed-medium-r-*-*-*-140-*-*-*-*-ISO10646-1") Or is this too kludgy? Oliver -- 20 Thermidor an 211 de la Révolution Liberté, Egalité, Fraternité!