[Gambas-user] Gambas called by Apache does not respect LANG?

Jussi Lahtinen jussi.lahtinen at gmail.com
Mon Feb 21 00:42:15 CET 2022


Not sure, maybe it is set in LC_TIME ?

Jussi

On Sun, Feb 20, 2022 at 5:44 PM Christof Thalhofer <chrisml at deganius.de>
wrote:

> Hi everybody,
>
> I have a problem with Gambas 3.16.3. I'm playing around with a Gambas
> program called from an Apache webserver via CGI.
>
> It contains this piece of code:
>
> -----------------------------------------------------------
> With Response
>     .ContentType = "text/plain; charset=utf-8"
>     .Begin
>     Print Env["LANG"] & " " & Format(Date(2000, 7, 1), "mmmm")
>     .End
> End With
> -----------------------------------------------------------
>
> which outputs the content of the $LANG environment variable and the
> formatted string of the month 'July'.
>
> But even though Apache started the program with the env variable $LANG
> set to 'de_DE.UTF-8' it prints wrong:
>
> 'de_DE.UTF-8 July'
>
> instead of the correct
>
> 'de_DE.UTF-8 Juli'
>
> What am I doing wrong? Thanks in advance.
>
> Alles Gute
>
> Christof Thalhofer
>
> --
> Dies ist keine Signatur
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220221/9d1ddac2/attachment-0001.htm>


More information about the User mailing list