-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
"invisible Unicode characters"-warning for carriage return characters in files with CRLF newlines #27091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The exception for files named README seems arbitrary to me. I don't think Gitea should be opinionated about newlines at all (even more so because the local Git installation that Gitea uses, has And I'm very surprised to find out that Gitea quietly converts newlines of existing files when editing via the web interface. To me this is a bug as well. I just tried with GitHub: create a repository, upload a file named README.html containing CRLF newlines via the web interface, download the same file again via the web interface: everything went without errors and the redownloaded file still has CRLF newlines. So GitHub didn't change the newlines and works as I'd expect Gitea to work as well. |
Actually, as I mentioned before, Gitea won't change this as well. The translation only happens when you edit file with the Gitea web interface. |
So now Gitea won't change the file content or show an error message with CRLF. So I'm closing it. |
Uh oh!
There was an error while loading. Please reload this page.
Description
Files with Windows newlines (CRLF) give the warning:
and when clicking
Escape
, the CR characters are marked as problematic.Gitea Version
1.20.4
Can you reproduce the bug on the Gitea demo site?
The site was unreachable when filing the issue.
Log Gist
No response
Screenshots
Git Version
2.41 (git version 2.41.0.windows.1)
Operating System
Windows 11 (Microsoft Windows 10.0.22621)
How are you running Gitea?
Using the official gitea-1.20.4-windows-4.0-amd64.exe, running as a Windows service as described in the Gitea docs.
Database
SQLite
The text was updated successfully, but these errors were encountered: