French Error Messages in BBEdit from Bash 4 on Sierra
Christopher Stone
listmeister at thestoneforge.com
Tue Jan 17 05:48:34 UTC 2017
[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
More information about the macports-users
mailing list