• Re: Warnings

    From db@dieterhansbritz@gmail.com to comp.lang.perl.misc on Wed Feb 14 16:57:14 2024
    From Newsgroup: comp.lang.perl.misc

    On 14.07.2023 17.43, Thomas Dorner wrote:
    db <dieterhansbritz@gmail.com> writes:

    When I run a script that runs gnuplot - and only such scripts -
    I get these warnings

    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "",
    LC_ALL = (unset),
    LANG = "da_DK.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").

    I am working under Kubuntu Linux. What do I have to do to
    get rid of these warnings? The script then goes on to
    work, but this is annoying.

    You probably need to activate (remove comment sign) your danish locale
    in /etc/locale.gen and rerun locale-gen (as stated in /etc/locale.gen).

    Best regards, Thomas

    It isn't there to uncomment. Can I just add it as a new line?
    What do the other two mean, LANGUAGE = "" and LC_ALL = (unset) ?
    Should I add all three lines?
    --
    Dieter Britz

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Eric Pozharski@apple.universe@posteo.net to comp.lang.perl.misc on Fri Feb 16 19:39:47 2024
    From Newsgroup: comp.lang.perl.misc

    with <uqinsq$2n5ta$1@dont-email.me> db wrote:
    On 14.07.2023 17.43, Thomas Dorner wrote:
    db <dieterhansbritz@gmail.com> writes:

    When I run a script that runs gnuplot - and only such scripts - I
    get these warnings

    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "",
    LC_ALL = (unset),
    LANG = "da_DK.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").

    I am working under Kubuntu Linux. What do I have to do to get rid of
    these warnings? The script then goes on to work, but this is
    annoying.
    You probably need to activate (remove comment sign) your danish
    locale in /etc/locale.gen and rerun locale-gen (as stated in
    /etc/locale.gen).
    Best regards, Thomas
    It isn't there to uncomment. Can I just add it as a new line? What do
    the other two mean, LANGUAGE = "" and LC_ALL = (unset) ? Should I add
    all three lines?

    (short answer) You are on your own.

    (standard answer) 'perldoc perllocale', read it. (It's hard to
    understand, yes).

    (bullshit answer) How you run mysterious script and your operating
    system are desynchronized. I suspect, something resets environment for mysterious script and/or child processes (because fsck you; maybe
    grounded in security or whatnot). Then sneaks (or inherits, who knows)
    $LANG. That $LANG refers to locale that is missing from your system
    (for whatever reasons).

    Now, there are multiple goals to choose. And, respectfully, multiple approaches to the goal you choosed. It's up for you to decide.

    But foremost. How locale and environment are handled and maintained
    heavily depends on (and is specific to) your operating system. No,
    linux is just a kernel. No, GNU/Linux doesn't say anything. No,
    Kubuntu (or whatever sister) isn't that widespread.

    IOW, your problem (if any) has nothing to do with perl or Perl. Please disregard standard answer.

    P.S. gnuplot? Insert here thatsnameihaventheardforlong.jpg
    --
    Torvalds' goal for Linux is very simple: World Domination
    Stallman's goal for GNU is even simpler: Freedom
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Dr Eberhard W Lisse@nospam@lisse.NA to comp.lang.perl.misc on Sat Feb 17 20:40:39 2024
    From Newsgroup: comp.lang.perl.misc

    Non Bullshit answer:

    https://stackoverflow.com/questions/2499794/how-to-fix-a-locale-setting-warning-from-perl

    On 2024-02-16 21:39, Eric Pozharski wrote:
    db <dieterhansbritz@gmail.com> writes:
    When I run a script that runs gnuplot - and only such scripts -
    I get these warnings

    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    [...]
    (bullshit answer)
    [...]

    --
    To email me replace 'nospam' with 'el'

    --- Synchronet 3.20a-Linux NewsLink 1.114