Skip to content

SysTools: Don't fail on encoding errors

Simon Hengel requested to merge sol/ghc:systools-encoding into master

Given #25570, I think it's unnecessarily risky to use the system encoding when capturing the output of SysTools.

Instead, it would be nice to:

  1. Instructs SysTools to produce their output as UTF-8
  2. Decode the output of SysTools with UTF-8//TRANSLIT, which replaces invalid byte sequences with replacement characters.

This is what this MR implements, provide that newlocale is available (part of POSIX.1-2008).

Edited by Simon Hengel

Merge request reports

Loading