unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* "Outer world" encoding for non-Latin1 language environments
@ 2002-02-27 11:29 Anton Zinoviev
  2002-02-27 11:10 ` Eli Zaretskii
  2002-03-01  1:28 ` Stefan Monnier
  0 siblings, 2 replies; 18+ messages in thread
From: Anton Zinoviev @ 2002-02-27 11:29 UTC (permalink / raw)


Hi!

Even when users choose some non-Latin1 language environment Emacs
doesn't suppose that it's new default encoding is actually the
encoding of the X-clipboard, the console font, etc.  This can be
easily changed in this way:

(set-language-info-alist
 "Ukrainian" `((documentation . "\
Support for Ukrainian with KOI8-U coding system.  If you prefer
UTF-8, please put in ~/.emacs the following line:
  (prefer-coding-system 'utf-8)")
                (charset ascii cyrillic-iso8859-5 mule-unicode-0100-24ff)
                (sample-text . "here some Ukrainian tekst")
                (setup-function . setup-koi8u-coding-system)
                (exit-function . reset-coding-system)
                (coding-system . (koi8-u utf-8))
                (coding-priority . (koi8-u utf-8))
                (nonascii-translation
                 . ,(get 'cyrillic-koi8u-nonascii-translation-table
                         'translation-table))
                (input-method . "cyrillic-ukrainian")
                (unibyte-display . cyrillic-koi8u)
                (features cyril-util))
 '("Cyrillic"))

Note the (setup-function . setup-koi8u-coding-system) and
(exit-function . reset-coding-system).  They can be defined by
(features cyril-util) in this way:

(defun setup-koi8u-coding-system () 
  (let ()
    (set-keyboard-coding-system 'koi8-u)
    (set-clipboard-coding-system 'koi8-u)
    (set-terminal-coding-system 'koi8-u)))

(defun reset-coding-system () 
  (let ()
    (set-keyboard-coding-system 'latin-1)
    (set-clipboard-coding-system nil)
    (set-terminal-coding-system nil)))

Maybe someone will propose a better solution?

Regards, Anton Zinoviev

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: "Outer world" encoding for non-Latin1 language environments
@ 2002-02-27 11:46 Kenichi Handa
  2002-02-27 12:11 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Kenichi Handa @ 2002-02-27 11:46 UTC (permalink / raw)
  Cc: anton, emacs-devel

Eli Zaretskii <eliz@is.elta.co.il> writes:
> On Wed, 27 Feb 2002, Anton Zinoviev wrote:

>>  Even when users choose some non-Latin1 language environment Emacs
>>  doesn't suppose that it's new default encoding is actually the
>>  encoding of the X-clipboard, the console font, etc.  This can be
>>  easily changed in this way:

> Why change it?  The default for X selections is compound-text, which can 
> handle many different languages/scripts mixed in a single selection.  
> What you propose (to set it to koi8-u) will limit the selections to a 
> single charset.  Why is that a good idea?

It may be good for such koi8-u environment that uses koi8-u
encoding directly for X selection and all the other X
applications expect that.

But, such a usage is against X's ICCCM (Inter-Client
Communication Conventions Manual) that says STRING type
selection can contain ASCII and Latin-1 only.

And it seems that the world is moving toward using UTF-8 or
using "Non-Standard Character Set Encodings" of
compound-text.

Are there any consensus in koi8-u community for such a usage
(i.e. using koi8-u directly in X selection)?

If not, I too agree with Eli.  Keep on using compound-text
as the default coding system for X selection is better.

By the way, the support for "Non-Standard Character Set
Encodings" in compound-text is recently added to Emacs by
the effort of Eli.  Currently it doesn't support koi8-u
because we haven't heard that people started to use that
method for koi8-u.

---
Ken'ichi HANDA
handa@etl.go.jp


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2002-03-22 12:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-27 11:29 "Outer world" encoding for non-Latin1 language environments Anton Zinoviev
2002-02-27 11:10 ` Eli Zaretskii
2002-03-01 18:00   ` Anton Zinoviev
2002-03-01 18:23     ` Stefan Monnier
2002-03-01 19:57     ` Eli Zaretskii
2002-03-05 10:57       ` Anton Zinoviev
2002-03-05 17:28         ` Eli Zaretskii
2002-03-06 18:27           ` Anton Zinoviev
2002-03-06 19:22             ` Eli Zaretskii
2002-03-06 20:16               ` Anton Zinoviev
2002-03-07  6:02                 ` Eli Zaretskii
2002-03-13 20:13                   ` Anton Zinoviev
2002-03-15  7:09                     ` Eli Zaretskii
2002-03-22 12:25                     ` Eli Zaretskii
2002-03-01  1:28 ` Stefan Monnier
2002-03-01  7:36   ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2002-02-27 11:46 Kenichi Handa
2002-02-27 12:11 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).