[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev reading sjis docs [was Re: lynxcgi problem]

From: Henry Nelson
Subject: lynx-dev reading sjis docs [was Re: lynxcgi problem]
Date: Wed, 22 Dec 1999 19:47:19 +0900 (JST)

> Or tell the parent lynx in its lynx.cfg to export *it's* value of TERM.
> Option LYNXCGI_ENVIRONMENT:TERM should do that.

This worked, so I didn't pursue it further.  [An explanation of why I
need it would of course be welcome.]

Actually, what this whole afair is about is that I finally had a chance
to look at an sjis page that supposedly Lynx could not render because of
those 1-byte kana we were discussing the other day.  Already I was
disappointed in the way Hiroyuki had chosen to handle such pages: a
manual override.  There is no need for that approach as it is best done
outside of Lynx (like so many other things I harp about).  Appended is
a short lynxcgi script based on Klaus's "," which is sufficient
to demonstrate what I mean.  It forces those 1-byte, X0201 kana to full-
width, X0208 kana, which are more "considerate." :)

What really shocked me, however, was that the page I was asked to look
at had the header:

<meta http-equiv="content-type" content="text/html; charset=x-sjis">.

Is Lynx ignoring that "charset=x-sjis?"  Somehow I had in my mind that
Lynx parsed and used the information in those META tags, Netscapism or
not.  If Lynx can determine the charset of the document from the META,
then certainly there should be no need for a manual override.  The
reason I didn't say much about it at the time is that I thought we were
talking about those all-too-many documents which are not declared
either by the server or a META in the document.  What would it take to
use that "x-sjis" to trigger better performance of the code-conversion
routines, and leave as a last resort manual override (or proxy/gateway)


#! /bin/sh
# "," a script to prepare sjis documents for rendering by Lynx.
# Forces X0201 kana to X0208 kana.  The idea comes from Klaus Weide's
# ""  Besides setting up this script as a lynxcgi, you need
# to define a proxy environment variable, e.g.,
# "setenv sjhttp_proxy 'lynxcgi://localhost/home/.lynxcgi/'
# 99/12/22  henry nelson  <address@hidden>
echo "Content-type: text/html"
LYNX="/usr/local/bin/lynx -cfg=/dev/null -source"
NKF="/usr/local/bin/nkf -S -e"
real_url="`echo $QUERY_STRING | sed 's/\/sj//'`"
$LYNX $real_url | $NKF

reply via email to

[Prev in Thread] Current Thread [Next in Thread]