octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave problems with locale


From: Rik
Subject: Re: octave problems with locale
Date: Tue, 29 Oct 2013 17:07:21 -0700

On 10/29/2013 01:55 PM, address@hidden wrote:
> Message: 1
> Date: Tue, 29 Oct 2013 18:42:42 +0100
> From: Torsten <address@hidden>
> To: Maintainers List Octave <address@hidden>
> Subject: Problems building octave
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=ISO-8859-1
>
>
> This also occurs when I start octave with
>
>   ./run-octave --no-gui
>
> and enter a float
>
>   octave-gui:1> 0:0.1:1    # the prompt really says octave-gui here
>   ans = [](1x0)
>   octave-gui:2> 0.3
>   ans = 0
>
> The effect does not occur in the real gui version.
>
> Changing LC_NUMERIC from de_DE.UTF-8 to en_US.UTF-8  solves the problem
> and I can finish the build.
>
> Is anyone else running into this?
>
> Torsten

10/29/13

Torsten,

Matlab expects that LC_NUMERIC is set to "C".  See this comment in octave_main_thread::run.

--- Code ---
  // Matlab uses "C" locale for LC_NUMERIC class regardless of local setting
  setlocale (LC_NUMERIC, "C");
--- End Code ---

So this would explain why it works when the GUI is running.  Does it work if you run the true CLI without any linked in GUI libraries?

--- Test code ---
./run-octave --no-gui-libs
0:0.1:1
--- End Test code ---

Also, just to be certain, does the following work?

--- Test code ---
setenv LC_NUMERIC C
./run-octave --no-gui
0:0.1:1
--- End Test code ---

If the two test cases work, then I suspect that the new octave needs to invoke setlocale just as the GUI does.

Cheers,
Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]