* need help in using a 10646 font with cp1251 text
@ 2003-08-06 20:30 Ted Zlatanov
2003-08-07 5:43 ` Eli Zaretskii
[not found] ` <mailman.175.1060231396.29551.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Ted Zlatanov @ 2003-08-06 20:30 UTC (permalink / raw)
Hi,
My cp1251 setup is simply
(codepage-setup 1251)
If I open a cp1251 document, I don't have a suitable font for it, for
instance:
character: З (07067, 3639, 0xe37)
charset: cyrillic-iso8859-5 (Right-Hand Part of Latin/Cyrillic Alphabet (ISO/IEC 8859-5): ISO-IR-144)
code point: 55
syntax: word
category: y:Cyrillic
buffer code: 0x8C 0xB7
file code: 0xC7 (encoded by coding system cp1251-unix)
font: -- none --
But when I save the document in UTF-8 encoding and then read it back,
I get the characters displayed normally:
character: З (01212067, 332855, 0x51437)
charset: mule-unicode-0100-24ff (Unicode characters of the range U+0100..U+24FF.)
code point: 40 55
syntax: word
category: y:Cyrillic
buffer code: 0x9C 0xF4 0xA8 0xB7
file code: 0xD0 0x97 (encoded by coding system mule-utf-8-unix)
font: -Misc-Fixed-Medium-R-Normal--10-100-75-75-C-60-ISO10646-1
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.
Thanks
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: need help in using a 10646 font with cp1251 text
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>
1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2003-08-07 5:43 UTC (permalink / raw)
> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.175.1060231396.29551.help-gnu-emacs@gnu.org>]
* Re: need help in using a 10646 font with cp1251 text
[not found] ` <mailman.175.1060231396.29551.help-gnu-emacs@gnu.org>
@ 2003-08-07 18:18 ` Oliver Scholz
2003-08-08 15:33 ` Ted Zlatanov
2003-08-08 15:29 ` Ted Zlatanov
1 sibling, 1 reply; 6+ messages in thread
From: Oliver Scholz @ 2003-08-07 18:18 UTC (permalink / raw)
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é!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: need help in using a 10646 font with cp1251 text
2003-08-07 18:18 ` Oliver Scholz
@ 2003-08-08 15:33 ` Ted Zlatanov
0 siblings, 0 replies; 6+ messages in thread
From: Ted Zlatanov @ 2003-08-08 15:33 UTC (permalink / raw)
On Thu, 07 Aug 2003, alkibiades@gmx.de wrote:
> 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]:
>
[...]
>
> Or is this too kludgy?
It may be OK, but I think code-pages.el is a more generic solution,
and it makes sense to use what comes with Emacs. Thank you!
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: need help in using a 10646 font with cp1251 text
[not found] ` <mailman.175.1060231396.29551.help-gnu-emacs@gnu.org>
2003-08-07 18:18 ` Oliver Scholz
@ 2003-08-08 15:29 ` Ted Zlatanov
2003-08-09 9:43 ` Eli Zaretskii
1 sibling, 1 reply; 6+ messages in thread
From: Ted Zlatanov @ 2003-08-08 15:29 UTC (permalink / raw)
On 07 Aug 2003, eliz@elta.co.il wrote:
>> 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.
The User-Agent header of my message showed the version, sorry I forgot
to say it explicitly.
> If not, you can find it either in the Emacs CVS or (I think) on
> gnu.emacs.sources.
This was the final kick I needed to jump to the CVS Emacs, so all in
all it was a good thing :)
code-pages.el works perfectly. I now get all my 8859-5/CP1251
Cyrillic text displayed in the 10646 font I use for Latin editing as
well.
Thanks
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: need help in using a 10646 font with cp1251 text
2003-08-08 15:29 ` Ted Zlatanov
@ 2003-08-09 9:43 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2003-08-09 9:43 UTC (permalink / raw)
> From: Ted Zlatanov <tzz@lifelogs.com>
> Newsgroups: gnu.emacs.help
> Date: Fri, 08 Aug 2003 11:29:59 -0400
>
> The User-Agent header of my message showed the version, sorry I forgot
> to say it explicitly.
I don't usually assume that the MUA used to post the message is the
same one where the described problem was found.
> code-pages.el works perfectly. I now get all my 8859-5/CP1251
> Cyrillic text displayed in the 10646 font I use for Latin editing as
> well.
I'm glad I could be of help.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-08-09 9:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2003-08-08 15:33 ` Ted Zlatanov
2003-08-08 15:29 ` Ted Zlatanov
2003-08-09 9:43 ` Eli Zaretskii
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).