From: Oliver Scholz <alkibiades@gmx.de>
Subject: Re: need help in using a 10646 font with cp1251 text
Date: Thu, 07 Aug 2003 20:18:16 +0200 [thread overview]
Message-ID: <87y8y549sh.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: mailman.175.1060231396.29551.help-gnu-emacs@gnu.org
Eli Zaretskii <eliz@elta.co.il> writes:
>> From: Ted Zlatanov <tzz@lifelogs.com>
>> 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é!
next prev parent reply other threads:[~2003-08-07 18:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-06 20:30 need help in using a 10646 font with cp1251 text Ted Zlatanov
2003-08-07 5:43 ` Eli Zaretskii
[not found] ` <mailman.175.1060231396.29551.help-gnu-emacs@gnu.org>
2003-08-07 18:18 ` Oliver Scholz [this message]
2003-08-08 15:33 ` Ted Zlatanov
2003-08-08 15:29 ` Ted Zlatanov
2003-08-09 9:43 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y8y549sh.fsf@ID-87814.user.dfncis.de \
--to=alkibiades@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).