On Thu, 19 Jan 2006, André Malo wrote:
> * Peter N. Lundblad wrote:
> > On Thu, 19 Jan 2006, Garrett Rooney wrote:
> > > On 1/19/06, André Malo <firstname.lastname@example.org> wrote:
> > > > By the way, at least in the past the locale information wasn't passed
> > > > to the hook scripts at all (I don't know if this was fixed already),
> > > > so the hook scripts could/can not determine the encoding anyway.
> > > > Passing UTF-8 encoded filenames is good and clear choice then.
> > >
> > > Now that is an interesting point. I'm not sure if the locale env
> > > variables are passed on or not... Will have to investigate that.
> > It's not fixed. Philip raised this some weeks ago. Just adding the LC_*,
> > LANG and LANGUAGE variables to the child process is the solution.
> > For the original question, if you run a server, then consider using an
> > UTF8 locale. Problem solved.
> When it's so easy, why not just pass utf-8 conditionless? What has the
> locale to do with passing stuff around *inside* a unicode system? It's
> really an unnecessary transition.
I think this depends on your perspective. I can understand your argument
about being "inside an UTF8 system". Still, I think programs usually
expect to communicate with their environment (stdin, stdout, stderr,
arguments, envars) using the locale encoding. If your hook script runs
some program that produces, say, output on stderr, that will use the
locale encoding. That's currently "C", but that might be considered a bug.
> Further - the original problem was (brought up on the httpd list), that the
> httpd doesn't set the locale. It doesn't need it (and actually doesn't want
> it, there are known issues inside the httpd with things like atof()). And
> actually I think, no server/daemon process should be dependant on the
> locale. I've actually seen weird problems with this (services requiring a
> locale of de_DE@euro [which is iso-8859-15], for example).
I understood that after my first reply. That seems like a real problem,
especially if this is unlikely to change.
To take a step back, it might not be unreasonable to have the hook scripts
communicate through UTF8 and document it. The hook scripts would have to
be careful to make things it invokes to consume/produce UTF8. I'm not sure
if can just change this for compatibility reasons, though.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sat Jan 21 22:12:45 2006