[Gambas-user] IDE Default language for new projects

BB adamnt42 at gmail.com
Wed Jan 25 12:53:25 CET 2023


On 25/1/23 7:43 pm, Martin wrote:
> Shell "'/usr/bin/gambas3' '/home/user/test'" With ["LANG=fr_FR.UTF-8"]


Well, OK!

Using the following:

Public Sub Main()

   ' System.Shell = "/usr/bin/bash"
   Shell "echo $LANG;echo $LC_ALL;geany" With ["LANG=fr_FR.UTF-8", "LC_ALL=fr_FR.UTF-8"]
   Wait
   Shell "echo $LANG;echo $LC_ALL;date" With ["LC_ALL=fr_FR.UTF-8"]
   Shell "'/usr/bin/gambas3' '/srv/gb3proj/SlipStream/daily/mtgcal3'" With ["LANG=fr_FR.UTF-8", "LC_ALL=fr_FR.UTF-8"]

It seems, here at least, that

a) System.Shell does not seem to affect the outcome.

b) It looks like LC_ALL is the beast that needs to be set, LANG just 
doesn't cut it.

c) Thus, you are correct. When I set LANG in a terminal the above code 
and the same commands in a terminal (xfce4-terminal here) both give

fr_FR.UTF-8
fr_FR.UTF-8
en_AU.UTF-8
fr_FR.UTF-8
mer. 25 janv. 2023 22:04:40 ACDT

and geany and the IDE in French

but just setting LANG in the "Shell With" stream gives

fr_FR.UTF-8
en_AU.UTF-8
fr_FR.UTF-8
en_AU.UTF-8
Wed 25 Jan 2023 22:13:05 ACDT

and the two programs start in EN


But wait! Don't call yet! What is extremely oddish is that 2nd output! 
Inside the IDE it looks like the second call (with the date command) has 
retained the environment settings from the first call (geany). Now this 
*might* be considered correct but it could be extremely confusing should 
"Shell With" be used in widely different parts of the code. I might be 
wrong but I assumed that each "Shell With" would use a virgin ENV only 
affected by the settings specified in that call.


hmm

b

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230125/85f1adf3/attachment.htm>


More information about the User mailing list