[links-list] Re: FW: links-0.95.diff2: UTF-8 terminal output recoding for Links

Ben Sittler BSittler at KnowNow.com
Mon Apr 8 09:14:15 PDT 2002


Links team: here's a new version of the diff in plain-text format with the extraneous change to view.c excluded. -Ben

-----Original Message----- 
From: Ben Sittler 
Sent: Sun 4/7/2002 10:32 PM 
To: links-list at linuxfromscratch.org 
Subject: [links-list] FW: links-0.95.diff2: UTF-8 terminal output recoding for Links



This didn't make it to the list before (I hadn't subscribed yet.)

-----Original Message-----
From:   Ben Sittler
Sent:   Sun 4/7/2002 10:25 PM
To:     mikulas at artax.karlin.mff.cuni.cz; links-list at linuxfromscratch.org
Cc:     wsanchez at mit.edu; kragen at pobox.com
Subject:        links-0.95.diff2: UTF-8 terminal output recoding for Links

Dear Links team:

The attached patch causes Links to recode output to UTF-8. It is especially
useful with MacOS X Terminal.app in conjunction with my earlier patch for MacRoman 2000 character set support. After applying this patch, you will need to re-run "gen-intl" in the "intl" subdirectory.

Basically, this patch adds a terminal flag ("UTF-8 Hack" in the dialog box, denoted using "utf-8" after the terminal charset in the config file for a particular terminal) for recoding ourput from the terminal codepage to UTF-8.

Since recent releases of MacOS X Terminal.app (v51+) default to UTF-8 encoding, this is required to get non-ASCII characters to display in web pages.

It works in other UTF-8 terminals, too. In xterm (-u8 option with GNU Unifont as the font) all character sets suddenly work (although only one at any particular time.) In GNU screen (-U option) the same is true. I would imagine other UTF-8 terminals get the same behavior.

BUG: There is still no recoding of input from UTF-8 to the display codepage, so at the moment only ASCII input works as you would expect. I am working on a fix for this, but it's a bit more involved, as the input layer in Links does not at present have access to information about the display character set.

NOTE: This is *NOT* full Unicode support. It is merely output recoding. Links is still very much based on 8-bit codepages, and I have done nothing to change that.

-Ben




-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 12419 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/links-list/attachments/20020408/093b0d4e/attachment.bin>


More information about the links-list mailing list