From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.bugs Subject: bug#5235: 23.1; Unibyte keyboard input problem Date: Thu, 24 Dec 2009 23:21:41 +0800 Message-ID: <4B338705.5090508@gnu.org> References: <200912162217.14991.scianagoryczy@wp.pl> <4B2A60A1.2050804@gnu.org> <200912172025.58502.scianagoryczy@wp.pl> Reply-To: Jason Rumney , 5235@debbugs.gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1261669087 1956 80.91.229.12 (24 Dec 2009 15:38:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Dec 2009 15:38:07 +0000 (UTC) Cc: Tomasz =?UTF-8?Q?Zbro=C5=BCek?= , 5235@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 24 16:38:00 2009 Return-path: Envelope-to: geb-bug-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 1NNplG-0006Ql-QR for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Dec 2009 16:37:59 +0100 Original-Received: from localhost ([127.0.0.1]:54390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNplG-0003JC-TD for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Dec 2009 10:37:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNpkh-0002qt-3l for bug-gnu-emacs@gnu.org; Thu, 24 Dec 2009 10:37:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNpkb-0002mA-My for bug-gnu-emacs@gnu.org; Thu, 24 Dec 2009 10:37:22 -0500 Original-Received: from [199.232.76.173] (port=34433 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNpkb-0002lu-EC for bug-gnu-emacs@gnu.org; Thu, 24 Dec 2009 10:37:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49874) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NNpkb-0007e1-2p for bug-gnu-emacs@gnu.org; Thu, 24 Dec 2009 10:37:17 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NNpWo-0003JY-8U; Thu, 24 Dec 2009 10:23:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: Jason Rumney , 5235@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Dec 2009 15:23:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5235 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.126166815312719 (code B ref -1); Thu, 24 Dec 2009 15:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Dec 2009 15:22:33 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NNpWL-0003J6-Fx for submit@debbugs.gnu.org; Thu, 24 Dec 2009 10:22:33 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NNpWK-0003Ip-7t for submit@debbugs.gnu.org; Thu, 24 Dec 2009 10:22:32 -0500 Original-Received: from mail.gnu.org ([199.232.76.166]:56065 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NNpW1-00019T-Ru for submit@debbugs.gnu.org; Thu, 24 Dec 2009 10:22:21 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NNpVx-0006IS-JK for submit@debbugs.gnu.org; Thu, 24 Dec 2009 10:22:10 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:51322) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NNpVx-0006IK-Dj for submit@debbugs.gnu.org; Thu, 24 Dec 2009 10:22:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNpVx-0007nz-2R for bug-gnu-emacs@gnu.org; Thu, 24 Dec 2009 10:22:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNpVs-0007nO-4e for bug-gnu-emacs@gnu.org; Thu, 24 Dec 2009 10:22:08 -0500 Original-Received: from [199.232.76.173] (port=37585 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNpVr-0007nJ-U0 for bug-gnu-emacs@gnu.org; Thu, 24 Dec 2009 10:22:03 -0500 Original-Received: from mail-yx0-f191.google.com ([209.85.210.191]:57537) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NNpVq-0006Gy-Tr for bug-gnu-emacs@gnu.org; Thu, 24 Dec 2009 10:22:03 -0500 Original-Received: by yxe29 with SMTP id 29so22640551yxe.14 for ; Thu, 24 Dec 2009 07:21:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:message-id :date:from:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=vDKRFQhC5A3f+K67d306nE0ripfFOgydhsJXX/m3UGg=; b=FglxpftltLyePj5xytUumkLtTTYBdKzVkQF2bHbNhtHOrLu54sQQoKzadVWmUbTLJy QbpyCcWmTQqi5wmYBY6J39ZCMv9iqXpo/u/PEibojTn944RAoNj+UUe2Bn8VV7+HqyYI xs7InFIrIeeuPILVhoYg6emE16Gv2FmoGYEys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=RPCk2kLm+O86OucVTZgcY22na1MXhtPwyGEnbzCz13ngY60xZSsavuIEbOkZU0yhy9 c6BNw1BtHt7ZEJrcPPyJtWrStknBzxlYSdBbWwIez6VDy+GJQHRB1vCxuseDQZ8FxwN/ VajQCSzNTMIFA5JlielDjAyVLSTJTVxxNmfUI= Original-Received: by 10.101.183.37 with SMTP id k37mr10045667anp.70.1261668107807; Thu, 24 Dec 2009 07:21:47 -0800 (PST) Original-Received: from wanchan.jasonrumney.net ([118.101.105.51]) by mx.google.com with ESMTPS id 5sm3659569yxd.17.2009.12.24.07.21.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 24 Dec 2009 07:21:46 -0800 (PST) Original-Received: from wanchan.jasonrumney.net (localhost [127.0.0.1]) by wanchan.jasonrumney.net (Postfix) with ESMTP id DA05241; Thu, 24 Dec 2009 23:21:41 +0800 (MYT) User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -4.8 (----) Resent-Date: Thu, 24 Dec 2009 10:23:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33746 Archived-At: Stefan Monnier wrote: >> I'll try to explain why I need unibyte mode. I'm maintener of a C/C++ >> source code which has comments coded in cp1250 (polish language) but >> strings in code are coded in cp852. So I have two different code >> pages in source code file. This is old source code and it was >> developed in Windows (that's why comments are in cp1250) but is >> compiled to work on MS-DOS (that's why strings are coded in cp852). >> > > So what happens if you read those files as binary (i.e. C-x RET > r binary RET)? > At best, he'd end up silently screwing up his files even further, with cp1250, cp852 and now utf-8 encoded characters in them. More likely he would still get prompted when saving, just as if he'd used cp1250 or cp852 to read them. The problem here is the files, not Emacs. Basically the reason for using unibyte is that it allows the user to bury their head in the sand and pretend the problem does not exist. I work on similar files in my day job, with Japanese comments in ShiftJIS and Chinese comments in GB2312. An easy method of fixing such files would be nice, but the best I can think of would be to provide a recode-region function, which would still be too much manual work to be worth it to me given that I can barely make sense of the Japanese comments and can't make any sense of the Chinese ones. The original poster might be more motivated to make use of such a function if it existed though.