Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: LC_CTYPE weirdness



Sorry for the delay in responding.

On Feb 1, 11:21am, Christophe Kalt wrote:
} Subject: LC_CTYPE weirdness
}
} i have a line "export LC_CTYPE=iso_8859_1" in one of my startup
} files, and it used to work fine.  I recently got a new laptop,
} and went on to install the same OS, but while reinstalling
} packages, i ended up upgrading zsh from 3.0.5 to 3.0.7.
} 
} anyhow, for some reason, LC_CTYPE doesn't seem to get
} exported, yet it is set (as a variable).

The problem is that all the LC_* parameters have the PM_UNSET flag set
when they are defined as a special parameter.  During typeset_single()
in builtin.c, at around line 2865, there's this test:

		if (!(pm->flags & PM_UNSET) && !pm->env)
		    pm->env = addenv(pname, value ? value : getsparam(pname));

So the variable won't be exported, because it appears to be unset.  Once
it has become set, then the PM_UNSET flag is gone from the new setting;
hence:

} splitting the line in two ("LC_CTYPE=iso_8859_1;export LC_CTYPE") fixes
} the problem.

This is obviously wrong, and it doesn't fail this way in 3.1.6, but I
have not yet had time to track down what the differences are.  PWS, if
you have some insight, it would be appreciated.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author