Locale issue after Vero4K Easter update

For some reason, I get this error when Flexget wants to run, after the update:

2019-06-04 20:11 WARNING  manager                       Your locale declares ascii as the filesystem encoding. Any plugins reading filenames from disk will not work properly for filenames containing non-ascii characters. Make sure your locale env variables are set up correctly for the environment which is launching FlexGet.

This is weird, because Flexget worked fine and the locale had been set to UTF-8 when I initially installed the Vero4K last year. When I check Locale:

osmc@Vero:/$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE=UTF-8
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
osmc@Vero:/$

What could be the issue here?

Hi,

Locale looks correct to me, there wouldn’t be any harm in re-configuring it again as UTF-8; that may help resolve the issue:

sudo dpkg-reconfigure locales

Also how are you starting Flexget?

Thanks Tom.

I start flexget manually (to test) for example to check the version:
osmc@Vero:~$ ~/flexget/bin/flexget -V

But:
Apparently, something got damaged with my locales and it cannot be fixed:

osmc@Vero:~$ sudo dpkg-reconfigure
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
/usr/sbin/dpkg-reconfigure: please specify a package to reconfigure

I can’t even change it:

Generating locales (this might take a while)...
  en_GB.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
osmc@Vero:~$

Try sudo apt-get install locales.

Actually it might be because I have always used a Windows device and now I am on a Mac.
I read this: How to fix a locale setting warning from Perl - Stack Overflow

And only this solved it, I have no clue but it seems like a bit of a dirty hack:

Here is how to solve it on Mac OS Lion (10.7) or Cygwin (Windows 10):

Add the following lines to your bashrc or bash_profile on the host machine:

# Setting for the new UTF-8 terminal support in Lion
export LC_CTYPE=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8

What version of macOS? I will see if I can reproduce.

Here’s how I handle locales: osmc/103-generate-locale.sh at master · osmc/osmc · GitHub

Mac doesn’t pass the locale to the client via SSH, so I set a sane fallback of C.

The latest, Mojave.
I have no idea why this happened but it was the first time I used a Mac to connect.
The fallback makes sense.

Maybe we also need to set LC_CTYPE.
Will check.

My Mac version: