ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: fmm on January 06, 2017, 11:07:37 AM

Title: "Setting locale failed" since version 10.21 under Windows 10
Post by: fmm on January 06, 2017, 11:07:37 AM
After updating exiftool to the latest version (from 10.00 to 10.38) under Windows 10 with Cygwin I noticed a warning issued by Perl related to setting the locale:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = "de_DE.UTF-8",
        LC_CTYPE = "de_DE.UTF-8",
        LANG = "de_DE.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the system default locale ("German_Germany.1252").


The last version of exiftool without this warning is 10.20. The in the history of version 10.21 I found:

QuoteWARNING: The Windows EXE package for this release was built on Windows 10 using Perl 5.24 instead of Windows XP and Perl 5.8 -- please watch for problems and report anything that you find

That's what I have done now ;)
Title: Re: "Setting locale failed" since version 10.21 under Windows 10
Post by: Phil Harvey on January 06, 2017, 11:32:31 AM
Thanks for this report, but I'm a bit confused.  If you are running from Cygwin then you shouldn't be using the Windows EXE version, in which case that warning in the version history doesn't apply.

But I googled for a solution and found these:  in Unix (eg. Cygwin) (http://stackoverflow.com/questions/2499794/how-to-fix-a-locale-setting-warning-from-perl), or in Windows (http://stackoverflow.com/questions/28336243/how-to-fix-a-locale-warning-from-perl-in-windows-7).

- Phil
Title: Re: "Setting locale failed" since version 10.21 under Windows 10
Post by: fmm on January 06, 2017, 06:35:08 PM
OK, I simply was too lazy to compile exiftool for Cygwin, so I took the Windows binary. Beside having a POSIX environment with the GNU tools under Windows, Cygwin for me is also a replacement for the Windows command prompt - I never use cmd.exe. So neither using exiftool in cmd nor changing the LC_* environment variables in Cygwin is an option for me. But there are a lot of workarounds, I know, e.g. using a wrapper script for exiftool with modified LC-* vars. The most clean solution probably is to compile exiftool for Cygwin - maybe I will try.

However, I thought you would be interested in the report to know that this is happening since version 10.21.

In any case, thanks for your quick response.
Title: Re: "Setting locale failed" since version 10.21 under Windows 10
Post by: Phil Harvey on January 06, 2017, 11:49:09 PM
Yes, thanks for the report.  I'm sure there must be a solution which involves a simple change to the Windows environment settings.  This is likely a problem encountered by other ActivePerl users, not just ExifTool.

- Phil