From owner-freebsd-questions@FreeBSD.ORG Tue Feb 22 02:22:20 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 399BF16A4CE for ; Tue, 22 Feb 2005 02:22:20 +0000 (GMT) Received: from smtp.owt.com (smtp.owt.com [204.118.6.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id B787443D3F for ; Tue, 22 Feb 2005 02:22:19 +0000 (GMT) (envelope-from kstewart@owt.com) Received: from [207.41.94.233] (owt-207-41-94-233.owt.com [207.41.94.233]) by smtp.owt.com (8.12.8/8.12.8) with ESMTP id j1M2Ljt3004566; Mon, 21 Feb 2005 18:21:45 -0800 From: Kent Stewart To: Gary Kline Date: Mon, 21 Feb 2005 18:22:17 -0800 User-Agent: KMail/1.7.2 References: <20050221065149.GA77396@thought.org> <200502202354.49454.kstewart@owt.com> <20050221230054.GA58364@thought.org> In-Reply-To: <20050221230054.GA58364@thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200502211822.17784.kstewart@owt.com> cc: freebsd-questions@freebsd.org Subject: Re: how do i translate non-ascii chars??? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2005 02:22:20 -0000 On Monday 21 February 2005 03:00 pm, Gary Kline wrote: > On Sun, Feb 20, 2005 at 11:54:49PM -0800, Kent Stewart wrote: > > On Sunday 20 February 2005 10:51 pm, Gary Kline wrote: > > > l > > > Guys, > > > > > > I've got sseveral HTML files with O-aigu and O-grave and > > > others (these files were composed on a Mac. Rather than > > > display as ['] (apostrophes) or backticks, they are rendered > > > in full 8859-1. > > > > > > How to I translate these > 128 range characters? I'm > > > wedged. > > > > When people do this, they are supposed to use the á, > > à, and etc. Then, their browser does the correct display on > > their OS. > > I didn't explain myself very well, sorry. Befow is a line > from od -c on the index.html file. I'm not sure how this > will be rendered in the different mailers, but in mutt with > nvi, the "B" is surrounded by two iso8859-1 characters. > In mozilla, same way. It is meant to be `B'. I've got over > 28 files with what should be apostrophes and bcktcks rendered > this way. putchar() outputs these characters in 8859 form > --as characters. printf("0%o", ch); gives me their octal > values. But trying to catch them with getchar() and it > fails. gcc says that '\0325' is a dounle-wide. > > Maybe "od -c" is seeing this file as 16-bit characters... > > > r h y m i n g =D4 B =D5 w o r d Did you try -oc or -hc. I have one file that I translate from a Mac .doc=20 into html and his bullets translate into what vi sees as the Yen=20 symbol. I was always able to cut and paste into vi and then supply the=20 proper character. The problem is that the apostrophe is probably best=20 handled as "´". There isn't a comparable name for the grave. I=20 did the bullet translate with something like ":.,$s/=A5/\•/",=20 knowing that it would not appear as a bullet on some computers. I=20 followed the 80/20 rule and translated it for the PC's. I have always used the table in Castro's book as the source. She created=20 a table that works between OSes. Some things such as your grave do not=20 translate from one system to another. I do not use those characters in=20 my html. The visual value is only as good as your worst mistake.=20 Something that doesn't display properly will be viewed as an error by=20 the viewer. Kent > > gary =2D-=20 Kent Stewart Richland, WA http://users.owt.com/kstewart/index.html