[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TUTORIAL.bg and windows-1251

From: Kenichi Handa
Subject: Re: TUTORIAL.bg and windows-1251
Date: Wed, 26 Nov 2003 16:47:14 +0900 (JST)
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)

In article <address@hidden>, Ognyan Kulev <address@hidden> writes:
> Kenichi Handa wrote:
>>  In article <address@hidden>, Ognyan Kulev <address@hidden> 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

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

Such lang. env. as Bulgarian will have `overrinding-fontset'
property whose value is used as an argument to the above

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]