From 1418f97c70a5551bdbfeea853cbc479b32ea9e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 31 Jul 2022 18:46:53 +0200 Subject: File: Re-add support to skip CR (`\r`) in `File::get_as_text` This was removed in #63481, and we confirmed that it's better like this, but we add back the possibility to strip CR as an option, to optionally restore the previous behavior. For performance this is done directly in `String::parse_utf8`. Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR. Supersedes #63717. --- misc/scripts/file_format.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'misc/scripts') diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh index c767d3f8a0..731b3ee005 100755 --- a/misc/scripts/file_format.sh +++ b/misc/scripts/file_format.sh @@ -37,6 +37,8 @@ while IFS= read -rd '' f; do continue elif [[ "$f" == *"-so_wrap."* ]]; then continue + elif [[ "$f" == *".test.txt" ]]; then + continue fi # Ensure that files are UTF-8 formatted. recode UTF-8 "$f" 2> /dev/null -- cgit v1.2.3