Thorsten Schöning
2018-02-10 08:59:56 UTC
Hi all,
I'm using the PHP webapp WebSVN and ran into encoding problems with
file names in my Linux environment when e.g. creating downloadable
Zipr or Tars using WebSVN. I worked around those problems using a
different syntax. I know the needed syntax and all but am not sure if
it is even necessary to handle Windows specifically the same way.
I think this depends on if the svn binary honors the env var LANG on
Windows at all? PHP itself simply executes "cmd.exe /C '...' in the
end. So which encoding is used in this case with and without setting a
LANG variable? I have the feeling it's that of the invoked cmd.exe
process in both cases because APR handles that specially for Windows?
Thanks!
Mit freundlichen Grüßen,
Thorsten Schöning
--
Thorsten Schöning E-Mail: ***@AM-SoFT.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/
Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
I'm using the PHP webapp WebSVN and ran into encoding problems with
file names in my Linux environment when e.g. creating downloadable
Zipr or Tars using WebSVN. I worked around those problems using a
#!/bin/sh
export LC_CTYPE=de_DE.UTF-8
svn $*
Other people fixed this differently by using setlocale in WebSVNexport LC_CTYPE=de_DE.UTF-8
svn $*
// Make sure that the input locale is set up correctly
setlocale(LC_ALL, $config->getLocale());
$cmd = $this->svnCommandString('blame', $path, $rev, $peg).' > '.quote($filename);
if ($config->getLocale() != null)
$cmd = "LANG=".setlocale(LC_ALL, 0)." ".$cmd;
A command line like this doesn't work on Windows, it at least needs asetlocale(LC_ALL, $config->getLocale());
$cmd = $this->svnCommandString('blame', $path, $rev, $peg).' > '.quote($filename);
if ($config->getLocale() != null)
$cmd = "LANG=".setlocale(LC_ALL, 0)." ".$cmd;
different syntax. I know the needed syntax and all but am not sure if
it is even necessary to handle Windows specifically the same way.
I think this depends on if the svn binary honors the env var LANG on
Windows at all? PHP itself simply executes "cmd.exe /C '...' in the
end. So which encoding is used in this case with and without setting a
LANG variable? I have the feeling it's that of the invoked cmd.exe
process in both cases because APR handles that specially for Windows?
Thanks!
Mit freundlichen Grüßen,
Thorsten Schöning
--
Thorsten Schöning E-Mail: ***@AM-SoFT.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/
Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow