belingueres commented on code in PR #1376:
URL: https://github.com/apache/maven-scm/pull/1376#discussion_r3929839745
##########
maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java:
##########
@@ -124,8 +158,12 @@ public static Commandline getBaseSvnCommandLine(
public static int execute(Commandline cl, StreamConsumer consumer,
CommandLineUtils.StringStreamConsumer stderr)
throws CommandLineException {
- // SCM-482: force English resource bundle
- cl.addEnvironment("LC_MESSAGES", "en");
+ // ISSUE-1375: ensure that LC_ALL is unset to avoid locale issues with
svn command output parsing
+ // (setting just LC_ALL=C goes too far, since it would imply that
LC_CTYPE=C, which would cause
+ // svn to output non-ASCII chars in an unreadable way.)
+ // SCM-482: force English resource bundle (LC_MESSAGES was "en" before
ISSUE-1375)
+ cl.addEnvironment("LC_ALL", "");
+ cl.addEnvironment("LC_MESSAGES", "C");
Review Comment:
forcing LC_ALL=C is wrong since it breaks UTF8 chars. Examples:
> gabriel@PC-Gabriel:/mnt/c/Trabajo/cv-gabriel$ LC_MESSAGES=C
LC_ALL=es_AR.UTF-8 svn update
Updating '.':
En la revisión 29.
gabriel@PC-Gabriel:/mnt/c/Trabajo/cv-gabriel$ LC_MESSAGES=C LC_ALL=C svn
update
Updating '.':
svn: E000022: Error converting entry in directory
'/mnt/c/Trabajo/cv-gabriel' to UTF-8
svn: E000022: Can't convert string from native encoding to 'UTF-8':
svn: E000022: email-postulacion.txt
gabriel@PC-Gabriel:/mnt/c/Trabajo/cv-gabriel$ LC_MESSAGES=C LC_ALL= svn
update
Updating '.':
At revision 29.
The LC_MESSAGES=C LC_ALL=es_AR.UTF-8 is wrong because the plugin expect
english messages.
LC_MESSAGES=C LC_ALL=C is wrong because it breaks UTF8 compatibility (the
file name was "email-postulación.txt")
C_MESSAGES=C LC_ALL= is ok. Messages are forced to be in english, while
LC_ALL is cleared (in case it was previously set in the process)
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]