On 2007-05-04 11:48:29 -0400, Guy Hulbert wrote:
> On Fri, 2007-05-04 at 17:08 +0200, Peter J. Holzer wrote:
> > So either the locale should be reset at the end of the function to the
> > original value or it should be set globally.
> 
> You suggested unsetting LANG.
> 
> That seems to be the same as setting LANG=C.

Yes, that's the same, by definition.

I don't understand why you quoted that particular paragraph, though,
where I did not suggest unsetting LANG. Here I suggested that either:

1) LANG should be set globally to a value, so that each method and
   plugin can assume a specific behaviour (that value should probably be
   "C" or undef, since any other value isn't portable between systems), 

   or

2) A function which modifies LANG should restore the original value
   before returning. So if a specific function needs LANG=C or maybe
   LANG=de_AT.utf8 to achieve a specific effect, it can change it, but
   it must change LANG back to the value it was before. It can't just
   set it and leave it at that value. If LANG can change its value
   seemingly at random during execution, that's a maintenance nightmare.

(That's a non-exclusive or, btw)

        hp

-- 
   _  | Peter J. Holzer    | I know I'd be respectful of a pirate 
|_|_) | Sysadmin WSR       | with an emu on his shoulder.
| |   | [EMAIL PROTECTED]         |
__/   | http://www.hjp.at/ |    -- Sam in "Freefall"

Attachment: signature.asc
Description: Digital signature

Reply via email to