Related to this question but more in-depth. I am running a command like the following:
foreach $dir (@dirs) {
$cnt = `svn st $dir | wc -l`;
if($cnt > 0){
$content .= "$dir\n";
$mods++;
}
}
However the directory contains non-ASCII files and thus throws an error when the locale is incorrect or not set.
The correct way to set the locale I need in perl is
setlocale(LC_CTYPE, 'en_US.UTF-8');
However, this does not seem to be affecting the svn st
command, as the locale error still occurs when the perl script is not run in a terminal with the correct locale set.