octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #57235] Startup file .octaverc is always read


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #57235] Startup file .octaverc is always read in the system encoding
Date: Thu, 25 Jun 2020 17:32:04 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #12, bug #57235 (project octave):

Sorry for letting this issue drop.  I promised to do something but now I'm not
sure what the problem is.

It looks like the default for input_system::m_file_encoding is "system" and if
that is used, then we look at the environment when deciding what encoding to
use.  If I set LANG=C in the environment and start Octave, then the first time
that file_reader::get_input is called, it uses the value returned from
octave_locale_charset_wrapper ("ANSI_X3.4-1968") and if I have
LANG=en_US.UTF-8 the encoding used is "UTF-8".  Is that wrong?

I see that in file_reader::get_input, we are comparing the value of the
encoding variable with "utf-8" and it appears to be a case-sensitive
comparison.  Is that the correct thing to do?

If we need to be able to set the encoding before reading config files, then
using an environment variable or a command-line option seems like the right
thing to do.  Since it seems like we are paying attention to the LANG value in
the environment, I don't understand what the problem is.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57235>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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