This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#!/bin/bash
# 新增自动修复功能
find . -type f -not -path './.git/*' -exec sh -c '
file="$1"
if file -b --mime-encoding "$file" | grep -qv binary; then
# 自动修复CRLF
if grep -qP '\r$' "$file"; then
sed -i 's/\r$//' "$file"
echo "🛠️ 已修复 $file"
fi
# 验证UTF-8编码
if ! iconv -f UTF-8 -t UTF-8 "$file" &>/dev/null; then