From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Text encoding Date: Fri, 02 May 2008 13:34:43 +0300 Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1209724560 19187 80.91.229.12 (2 May 2008 10:36:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 May 2008 10:36:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 02 12:36:36 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jrscy-0005o2-47 for geh-help-gnu-emacs@m.gmane.org; Fri, 02 May 2008 12:36:32 +0200 Original-Received: from localhost ([127.0.0.1]:54967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JrscG-0005oM-PG for geh-help-gnu-emacs@m.gmane.org; Fri, 02 May 2008 06:35:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jrsbo-0005jW-Pt for help-gnu-emacs@gnu.org; Fri, 02 May 2008 06:35:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jrsbn-0005gw-Le for help-gnu-emacs@gnu.org; Fri, 02 May 2008 06:35:19 -0400 Original-Received: from [199.232.76.173] (port=53218 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jrsbn-0005gg-Dh for help-gnu-emacs@gnu.org; Fri, 02 May 2008 06:35:19 -0400 Original-Received: from mtaout5.012.net.il ([84.95.2.13]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jrsbn-0007T8-1t for help-gnu-emacs@gnu.org; Fri, 02 May 2008 06:35:19 -0400 Original-Received: from HOME-C4E4A596F7 ([84.229.228.217]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K08001OVM1OE5U1@i_mtaout5.012.net.il> for help-gnu-emacs@gnu.org; Fri, 02 May 2008 13:49:01 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53703 Archived-At: > From: Peter Dyballa > Date: Fri, 2 May 2008 00:54:15 +0200 > Cc: help-gnu-emacs@gnu.org > > > Am 01.05.2008 um 14:10 schrieb Oleg Oltar: > > > I tried to copy, text from my M$ Word document (text in > > Ukrainian) into Emacs. (I use this font in Emacs > > -*-courier-*-*-*-*-14-*-*-*-*-*-*-cp1251** > > > The mode-line shows the buffer is in Unicode encoding. So you better > should take care that the buffer is pre-set to the same encoding as > in the source application Actually, the value of buffer-file-coding-system has no relation whatsoever to the OP's problem: the problem is that characters inserted into a buffer from the X selection or the clipboard are decoded incorrectly. But decoding of characters from the X selection or the clipboard does NOT use buffer-file-coding-system, it uses selection-coding-system. Emacs allows you to insert into a buffer characters that cannot be safely encoded by the buffer's encoding. It's only when (and if) you try to save the buffer, Emacs will ask to supply a more suitable encoding.