after upgrade to 15.4 again perl: warning: Setting locale failed.

Hi, after the upgrade to 15.4 on my laptop running 15.4 and KDE the locale failed perl warning raise again
when I launch this command it gives me this warning:

pla@pla4ST:~/bin/foto-comments> exiftool -s -s  -ImageWidth "/home/pla/bin/foto-comments/origv.jpeg"
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US",
        LC_ALL = (unset),
        LC_MEASUREMENT = "it_IT.UTF-8",
        LC_MONETARY = "it_IT.UTF-8",
        LC_COLLATE = "it_IT.UTF-8",
        LC_CTYPE = "en_US.UTF-8",
        LC_TIME = "en_SE.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
ImageWidth: 1600
pla@pla4ST:~/bin/foto-comments> 



some month ago I solved in this way but now it gives me this error:

pla@pla4ST:~> sudo localedef -i en_SE -f UTF-8 en_SE
[sudo] password for root: 
[error] character map file `UTF-8' not found: No such file or directory
[error] cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory
pla@pla4ST:~> 

the /usr/share/i18n/charmaps doesn’t exist
I also tried with en_US and it_IT but the same error is given

how can I get rid of this warning?

You can configure your desktop environment (most likely KDE) so it does not attempt to set invalid locale environment variables. Like do not attempt to mix different languages and stick with one single language.

@pier_andreit:

Please note that, “localedef --help” gives the answer, almost –


System's directory for character maps : /usr/share/i18n/charmaps
                       repertoire maps: /usr/share/i18n/repertoiremaps
                       locale path    : /usr/lib/locale:/usr/share/i18n

But, for most systems, that directory doesn’t exist because, you have to install the package “glibc-i18ndata” to provide the data needed to build the locale data files to use the internationalization features of the GNU libc. But:

It is normally not necessary to install this packages, the data files are already created.

And, that’s not all –


 > LANG=C localedef -f UTF-8 -i en_SE en_SE.UTF-8
[error] cannot open locale definition file `en_SE': No such file or directory
 > 

Hmmm –––>>> There ain’t no “en_SE” in ‘/usr/share/i18n/locales/’ … >:)

But, the Internet comes to the rescue – <https://github.com/u296/en_SE&gt;.

  • Download the “en_SE” locale definition provided by “u296
    ” « whoever that is – a robot – someone dangerous – don’t know … » and drop the text file into ‘/usr/share/i18n/locales/’ … Maybe someone in Sweden can provide a more reliable “en_SE” locale definition … :wink:

maaaanythanks, I installed “glibc-i18ndata” and viewing that en_ES there wasn’t but there was en_DK I switched to en_DK and everything worksrotfl!

as I only used en_ES for time format and en_DK seems to do the same and is supported by “glibc-i18ndata” I switched to en_DK

Do we need to try and understand why the “Swedish locale for Finland” and, the “Swedish locale for Sweden” and, the “English locale for Denmark” are all maintained by people located in Denmark?

  • en_DK by the Danish Standards Association …
  • sv_FI and sv_SE by Selskabet for Rationel Almen Planlægning …

good idea but I don’t know how to understand:shame:

For those who haven’t realised it –

  • sv_SE and sv_FI –
    The “sv” as a country code possibly relates to the Swedish word for “Sweden” → “Sverige” …
    *=2]Yes, yes, “.sv” is the ISO-3166-1 TLD for “El Salvador” but, that seems to have been ignored by the Locale developers …