message: Fixed encoding with xml output (Close
diff: @@ -170,12 +170,21 @@ export class Svn {
  })
  ]);
  + let encoding = "utf8";
  +
  + // SVN with '--xml' always return 'UTF-8', and jschardet detects this encoding: 'TIS-620'
  + if (!args.includes("--xml")) {
  jschardet.MacCyrillicModel.mTypicalPositiveRatio += 0.001;
  const encodingGuess = jschardet.detect(stdout);
  - const encoding =
  - encodingGuess.confidence > 0.8 ? encodingGuess.encoding : "utf8";
  + if (
  + encodingGuess.confidence > 0.8 &&
  + iconv.encodingExists(encodingGuess.encoding)
  + ) {
  + encoding = encodingGuess.encoding;
  + }
  + }
  stdout = iconv.decode(stdout, encoding);
  