From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: August Newsgroups: gmane.emacs.help Subject: Re: Trying to input Unicode via GNU Emacs 21.3.1 Date: Sat, 12 Feb 2005 17:15:56 +0100 Message-ID: <1108224956.5324.9.camel@c83-250-206-179.bredband.comhem.se> References: <1108177560.6148.25.camel@c83-250-206-179.bredband.comhem.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1108226441 30488 80.91.229.2 (12 Feb 2005 16:40:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Feb 2005 16:40:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 12 17:40:40 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D00Ju-0002iT-CA for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Feb 2005 17:40:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D00Z4-0001tf-NR for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Feb 2005 11:56:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D00YP-0001sT-At for help-gnu-emacs@gnu.org; Sat, 12 Feb 2005 11:55:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D00Xk-0001h5-Pp for help-gnu-emacs@gnu.org; Sat, 12 Feb 2005 11:54:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D00Xc-0001WH-9l for help-gnu-emacs@gnu.org; Sat, 12 Feb 2005 11:54:46 -0500 Original-Received: from [81.228.10.108] (helo=av9-1-sn4.m-sp.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Czzvk-0008Bm-6M for help-gnu-emacs@gnu.org; Sat, 12 Feb 2005 11:15:36 -0500 Original-Received: by av9-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id 515AC37E58; Sat, 12 Feb 2005 17:15:32 +0100 (CET) Original-Received: from smtp4-1-sn4.m-sp.skanova.net (smtp4-1-sn4.m-sp.skanova.net [81.228.10.181]) by av9-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 43BA937E44 for ; Sat, 12 Feb 2005 17:15:32 +0100 (CET) Original-Received: from c83-250-206-179.bredband.comhem.se (c83-250-206-179.bredband.comhem.se [83.250.206.179]) by smtp4-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 2D47437E44 for ; Sat, 12 Feb 2005 17:15:32 +0100 (CET) Original-To: help-gnu-emacs@gnu.org In-Reply-To: <1108177560.6148.25.camel@c83-250-206-179.bredband.comhem.se> X-Mailer: Evolution 2.0.2 (2.0.2-3) 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 X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24053 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24053 On l=C3=B6r, 2005-02-12 at 04:06 +0100, August wrote: > On fre, 2005-02-11 at 22:31 +0100, David Kastrup wrote: > > List account writes: > >=20 > > > I am trying to use GNU Emacs 21.3.1 on FreeBSD (5.3) to edit web pa= ges > > > (I'm accessing my FreeBSD machine via Terminal.App on a Mac, with > > > TERM=3Dxterm-color). I need to input Unicode characters and have t= hem > > > appear properly in web browsers. Currently, I have gotten Emacs to > > > use "Unicode" mode (i.e. the two or three little "u"'s appear at th= e > > > bottom left), and I am able to enter characters that look just fine= in > > > Emacs, but they display as gibberish in browsers. > > > > > > For instance, I need to be able to display the typical accented > > > Spanish, Italian and French characters. As an example, I can input > > > "Alarc=C3=B3n" in Emacs and it looks fine, but it displays in my br= owser > > > (Camino 0.82 on Mac OS X) as "Alarc=C3=83=C2=B3n". The odd thing i= s that I > > > basically copied and modified this text from a page that actually > > > works just fine. > > > > > > I have the following lines in my .emacs: > > > (setq locale-coding-system 'utf-8) > > > (set-terminal-coding-system 'utf-8) > > > (set-keyboard-coding-system 'utf-8) > > > (set-selection-coding-system 'utf-8) > > > (prefer-coding-system 'utf-8) > >=20 > > It would appear that the browser is of the opinion that the selection > > is in latin-1, your system default. You are explicitly telling Emacs > > to ignore the system default. > >=20 > > Also with your other settings you tell Emacs that everything the > > locale appears to be is wrong. The easiest thing probably would be i= f > > you not only told your Emacs that all of your environment is utf-8, > > but if you just configured your environment to actually be so, in > > which case you would not have to tell all of those lies to Emacs. > >=20 > > It may be that in a Latin-1 locale, Emacs-21.3 does not have a way to > > tell the browser "Everything in the selection is utf-8". I believe > > that the development version of Emacs _has_ had some changes, due to > > some X conventions that have been introduced or become common-place > > only after Emacs 21.3 has been release, so it might fair better with > > passing Unicode characters over a selection that it principally > > Latin-1, at least when the other program also knows about those > > conventions. >=20 > I'm not sure it's the settings that causes the problem. I run Emacs on > Fedora Core 3 and have no coding system settings in my `.emacs'. All ne= w > buffers have coding system utf-8 by default, but Mozilla Firefox does > not display the letters `=C3=A5', `=C3=A4', `=C3=B6', `=C3=85', `=C3=84= ' or `=C3=96' correctly when I > view my own html pages, if I choose Latin-1 in Emacs they work with > Mozilla. In my case the problem showed out to be caused by a combination of the settings in Mozilla Firefox and in the Tidy HTML validation tool. In Mozilla I changed `Edit -> Preferences -> General -> Languages -> Character Encoding' from the default `Western (ISO-8859-1)' to `Unicode (UTF-8)' and in the tidy command i added `-utf8'. Now it works. --=20 August