Following up on shell(locale) problem

Mike Bonner bonnmike at gmail.com
Tue Mar 1 17:44:53 EST 2011


Ah k, hadn't seen this one..

*Thanks Francois.  I don;t think that's the problem though.  If I use the LC
shell command to execute the locale command and put it's output into a file,
the contents of the file are correct.  BUt then if I open the file in LC and
put the contents into a field, it's garbled again.*


I'd still be curious to know if
env; |grep LANG

returns the same environment variable value both from LC shell, and from
terminal, but no clue why reading in the file output from locale would cause
it to go funky.


On Tue, Mar 1, 2011 at 3:26 PM, Warren Samples <warren at warrensweb.us> wrote:

> On Tue, 2011-03-01 at 15:13 -0700, Mike Bonner wrote:
> > oh. If lc uses sh not bash, might need to parse whatever the default
> shell
> > resource file is for the LANG string, at which point you could manually
> set
> > it before calling locale. I don't recall if sh and bash are similar
> enough
> > to eat the same file.
> >
> > On Tue, Mar 1, 2011 at 3:10 PM, Mike Bonner <bonnmike at gmail.com> wrote:
> >
> > > If theres a .bashrc file, or .. well I forget what its name is supposed
> to
> > > be, you might try
> > >
> > > shell("source path/to/my/.bashrc; locale -k LC_NUMERIC")
> > >
> > > Basically, find the file that bash loads, source it to force to be
> > > processed, and then tack your command onto the end.
> > >
> > > On Tue, Mar 1, 2011 at 2:54 PM, Peter Haworth <pete at mollysrevenge.com
> >wrote:
> > >
> > >> Thanks Warren.  I just used the message box on my Mac and got the same
> > >> (incorrect) output too.  It's good to know if works under Linux though
> > >> because that makes me think it's an LC bug even more.
> > >>
> > >> I'm currently researching if there's a way to get this info using
> > >> Applescript (without issuing a shell command I mean) as a means to
> work
> > >> around the problem.
> > >>
> > >> Pete Haworth
> > >>
> > >> On Mar 1, 2011, at 1:42 PM, Warren Samples wrote:
> > >>
> > >> > Hi Peter,
> > >> >
> > >> > Doing 'put shell("locale -k LC_NUMERIC")' in the message box returns
> the
> > >> > same (expected) result for me here, running Linux, as I get in a
> > >> > terminal. Same for putting the result into a field. I do get the
> same
> > >> > unexpected behavior as you under OS X, however. I know this doesn't
> help
> > >> > you solve you problem, but at may help isolate whatever bug it is
> that's
> > >> > causing it.
> > >> >
> > >> > Good Luck,
> > >> >
> > >> > Warren
> > >>
> > >>
>
> Hello,
>
> "Which shell" doesn't seem to be the problem. 'locale' returns the same
> result regardless of the shell it's called from. Tried it in 'csh',
> 'zsh', 'bash' and sh. 'sh' and '/bin/sh' seem to just be aliases for
> bash under OS X, at any rate. Is that not correct?
>
> Warren
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list