Re: French Error Messages in BBEdit from Bash 4 on Sierra

2017-01-17 Thread Christopher Stone
On Jan 17, 2017, at 07:16, Rainer Müller > wrote:
> So what are the values of the environment variables such as LANG,
> LC_ALL, etc. inside Terminal? What is the output of 'locale'?


Thanks Ryan and Rainer.

Bash 4 (Macports) in the Terminal:

chris$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=


BBEdit:

#!/usr/bin/env bash
locale

LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=


CodeRunner:

#!/usr/bin/env bash
locale

LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=


TextMate:

#!/usr/bin/env bash
locale

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=


To reiterate:

This issue did not occur on my macOS 10.11.6 system.

Only when I “upgraded” to Sierra did it occur.

SysInfo: { MacBookPro6,1 · 2.66 GHz Intel Core i7 · 8GB RAM · OSX 10.12.2 }

Alright.  I've set LANG and LC_ALL to "en_US.UTF-8" in ~/.profile, and this is 
defeating the problem.

It sure looks like a bug though.

--
Best Regards,
Chris



Re: French Error Messages in BBEdit from Bash 4 on Sierra

2017-01-16 Thread Ryan Schmidt

> On Jan 16, 2017, at 23:48, Christopher Stone  
> wrote:
> 
> [While writing this up I solved the immediate problem – but failed to 
> discover the why.]
> 
> 
> Hey Folks,
> 
> Well, this is weird...
> 
> I only recently updated to Sierra and have been going through the expected 
> teething period – updating ports, etc.
> 
> Yesterday I was testing a bash/perl script in BBEdit.
> 
> ---
> #!/usr/bin/env bash
> 
> phoneList='(123) 456-7890
> (456) 567-9050';
> 
> echo "$p | perl -0777 -ne 's/(?<=78)(.*? 5)/'X' x length $1 /se; print';
> ---
>  ˆˆ
> 
> Somehow my variable got partially eaten, so when I ran the script it 
> naturally threw an error:
> 
> 
> Jan 16, 2017, 23:08:47
> untitled text
> 
> untitled text: ligne 6: fin de fichier (EOF) prématurée lors de la recherche 
> du « " » correspondant
> untitled text: ligne 7: erreur de syntaxe : fin de fichier prématurée
> 
> 
> Imagine my surprise when the error message was in French — my macOS 10.12.2 
> system is set to English (U.S.).
> 
> Running same script from the Terminal returns a normal U.S. English error 
> message:
> 
> ---
> 
> chris$ ./test
> ./test: line 14: unexpected EOF while looking for matching `"'
> ./test: line 20: syntax error: unexpected end of file
> 
> ---
> 
> Bash 4.4.5(1)-release was installed via Macports.
> 
> I have no language or locale setting options in my ~/.profile.
> 
> When I switch the shell to /bin/bash the error message in BBEdit (etc) 
> reverts to English.
> 
> Switching back to Bash 4 (/opt/local/bin/bash) brings back the French error 
> message.
> 
> When run from TextMate the script produces an English error message.
> 
> When run from CodeRunner it produces a French error message.
> 
> When run from Atom it produces a French error message.
> 
> I rebooted the system, and that failed to solve anything.
> 
> I uninstalled and reinstalled Bash 4 with Macports – nada.
> 
> I looked in my Language settings and French was item 2 in the preferred 
> language list.
> 
> English (U.S.)
> French
> Hebrew
> 
> So – on the off-chance I deleted French and Hebrew, and voilà – I got back my 
> English error messages in BBEdit (etc).
> 
> If someone has an insight into why this happened I'd be interested to hear it.

All I can add is that the GIMP UI is unexpectedly German for me. German is the 
second language in my Language & Region preferences, after English.




French Error Messages in BBEdit from Bash 4 on Sierra

2017-01-16 Thread Christopher Stone
[While writing this up I solved the immediate problem – but failed to discover 
the why.]


Hey Folks,

Well, this is weird...

I only recently updated to Sierra and have been going through the expected 
teething period – updating ports, etc.

Yesterday I was testing a bash/perl script in BBEdit.

---
#!/usr/bin/env bash

phoneList='(123) 456-7890
(456) 567-9050';

echo "$p | perl -0777 -ne 's/(?<=78)(.*? 5)/'X' x length $1 /se; print';
---
  ˆˆ

Somehow my variable got partially eaten, so when I ran the script it naturally 
threw an error:


Jan 16, 2017, 23:08:47
untitled text

untitled text: ligne 6: fin de fichier (EOF) prématurée lors de la recherche du 
« " » correspondant
untitled text: ligne 7: erreur de syntaxe : fin de fichier prématurée


Imagine my surprise when the error message was in French — my macOS 10.12.2 
system is set to English (U.S.).

Running same script from the Terminal returns a normal U.S. English error 
message:

---

chris$ ./test
./test: line 14: unexpected EOF while looking for matching `"'
./test: line 20: syntax error: unexpected end of file

---

Bash 4.4.5(1)-release was installed via Macports.

I have no language or locale setting options in my ~/.profile.

When I switch the shell to /bin/bash the error message in BBEdit (etc) reverts 
to English.

Switching back to Bash 4 (/opt/local/bin/bash) brings back the French error 
message.

When run from TextMate the script produces an English error message.

When run from CodeRunner it produces a French error message.

When run from Atom it produces a French error message.

I rebooted the system, and that failed to solve anything.

I uninstalled and reinstalled Bash 4 with Macports – nada.

I looked in my Language settings and French was item 2 in the preferred 
language list.

English (U.S.)
French
Hebrew

So – on the off-chance I deleted French and Hebrew, and voilà – I got back my 
English error messages in BBEdit (etc).

If someone has an insight into why this happened I'd be interested to hear it.

--
Best Regards,
Chris