Re: Missing First Letter?

Thomas Dickey <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
On Mon, Apr 05, 2021 at 09:49:35AM -0500, Tim Chase wrote:
> On 2021-04-05 09:19, Tim Chase wrote:
> > That's odd.  I get the inverse behavior from what you describe.  If
> > I use
> > 
> >   $ LANG=C lynx chime.html
> > 
> > I get the unicode placeholder character for the opening
> > fancy-double-quote and lynx displays the full "Hello", but if I do
> > 
> >   $ LANG=en_US.UTF-8 lynx chime.html
> > 
> > I get the vanishing "H".

I don't see this, but when I test locales, I usually use this:

	#!/bin/sh
	# $Id: with-locale,v 1.7 2015/08/16 21:20:39 tom Exp $
	unset LANG
	unset LC_ALL
	unset LC_CTYPE
	unset LESSCHARSET

	LANG=$1
	LC_ALL=$1
	GDM_LANG=$1

	export LANG
	export LC_ALL
	export GDM_LANG
	if test $# != 0
	then
		shift 1
		exec "$@"
	fi
 
...and in a quick check, I did

	with-locale C sh
	$ LANG=en_US.UTF-8 lynx chime.html

I haven't seen a combination which makes that "H" vanish, though the
double-quote can be lost...

> To provide additional context, this is in an xterm on FreeBSD 12.2p4
> 
It may depend on what other locale-related environment variables you have set.
FreeBSD's manpage for setlocale says of LANG:

     LANG         Sets the generic locale category for native language, local
                  customs and coded character set in the absence of more
                  specific locale variables.

but LC_ALL and LC_CTYPE are more specific.

On my Debian/testing, the manpage gives more details:

       If  locale  is an empty string, "", each part of the locale that should
       be modified is set according to the environment variables.  The details
       are  implementation-dependent.   For  glibc, first (regardless of cate‐
       gory), the environment variable LC_ALL is inspected, next the  environ‐
       ment variable with the same name as the category (see the table above),
       and finally the environment variable LANG.  The first existing environ‐
       ment  variable  is used.  If its value is not a valid locale specifica‐
       tion, the locale is unchanged, and setlocale() returns NULL.

> $ ident `which xterm`
> /usr/local/bin/xterm:
>      $FreeBSD: releng/12.2/lib/csu/amd64/reloc.c 339351 2018-10-13 23:52:55Z kib $
>      $FreeBSD: releng/12.2/lib/csu/amd64/crt1.c 339351 2018-10-13 23:52:55Z kib $
>      $FreeBSD: releng/12.2/lib/csu/common/ignore_init.c 339351 2018-10-13 23:52:55Z kib $
>      $FreeBSD: releng/12.2/lib/csu/amd64/crti.S 217105 2011-01-07 16:07:51Z kib $
>      $FreeBSD: releng/12.2/lib/csu/common/crtbrand.c 366954 2020-10-23 00:00:52Z gjb $
>      $FreeBSD: releng/12.2/lib/csu/amd64/crtn.S 217105 2011-01-07
>      16:07:51Z kib $
> 
> (and for context, I have LANG=en_US.UTF-8 in my default environment,
> so that 2nd one example was only to be explicit about what would
> otherwise be default behavior)
> 
> -tim
> 
> 

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net
ftp://ftp.invisible-island.net

_______________________________________________
Lynx-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lynx-dev
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQTFIEjAwHSP7iJ9R6JwI1Pg9+SO2wUCYGt3AQAKCRBwI1Pg9+SO
22LOAKDN1E/seFtn1vNKTK+udeDnhiEqxwCeLhPKes2FE47qSF3p7Cb9/WBPqy0=
=UNkD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.