Merge pull request #3450 from citusdata/fix-ci-locale-issues

diff-filter: use utf8 encoding, not ascii
pull/3454/head
Hadi Moshayedi 2020-01-30 21:57:18 -08:00 committed by GitHub
commit 1adc293286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ then
touch "$file1" # when adding a new test the expected file does not exist
sed -Ef "$BASEDIR/normalize.sed" < "$file1" > "$file1.modified"
sed -Ef "$BASEDIR/normalize.sed" < "$file2" > "$file2.modified"
"$DIFF" -w $args "$file1.modified" "$file2.modified" | diff-filter "$BASEDIR/normalize.sed"
"$DIFF" -w $args "$file1.modified" "$file2.modified" | LC_CTYPE=C.UTF-8 diff-filter "$BASEDIR/normalize.sed"
exit ${PIPESTATUS[0]}
else
exec "$DIFF" -w $args "$file1" "$file2"

View File

@ -49,7 +49,7 @@ def main():
if line.startswith('+++ '):
tab = line.rindex('\t')
fname = line[4:tab]
file2 = FileScanner(open(fname.replace('.modified', '')), sed)
file2 = FileScanner(open(fname.replace('.modified', ''), encoding='utf8'), sed)
stdout.write(line)
elif line.startswith('@@ '):
idx_start = line.index('+') + 1