如何阻止 Filezilla 更改我的换行符?

发布于 2024-07-13 08:21:01 字数 440 浏览 16 评论 0原文

我正在从 Linux Web 服务器下载 perl CGI 文件。

它有 Unix 换行符。 我在 Windows PC 上用一个不错的文本编辑器(Geany)编辑它,它保留了这些换行符。

然后我用 Filezilla 再次上传它,它有 DOS 换行符,这导致它无法工作。

我知道它是 Filezilla,而不是 Geany,因为即使我只是下载它并重新上传,问题也会再次出现。

Filezilla 每次都会询问我是否可以上传本地文件(3611)字节并覆盖远程文件(3753 字节),这些数字之间的差异就是我的文件中的行数。 但是当我这样做时,服务器上的大小又变成了 3753 字节,并且不起作用。

我正在通过代理服务器,这可能是一个因素吗? 真正奇怪的是,前几天我在另一台 XP PC 上做了同样的事情,但效果很好。 命令行 FTP 也可以正常工作。

I'm downloading a perl CGI file from a Linux web server.

It has Unix linebreaks. I edit it on a Windows PC with a decent text-editor (Geany) which preserves those linebreaks.

I then upload it again with Filezilla and it has DOS linebreaks, which stop it working.

I know it's Filezilla, not Geany because even if I just download it, and re-upload it, the problem recurs.

Filezilla asks me, every time, if I'm OK to upload the local file (3611) bytes and overwrite the remote file (3753 bytes), and the difference between those numbers is the number of lines in my file. But when I do that, the one on the server is 3753 bytes all over again and doesn't work.

I'm going through a proxy server, might that be a factor? The really weird thing is I did the same thing on a different XP PC just the other day and it was fine. And command-line FTP works fine too.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

最单纯的乌龟 2024-07-20 08:21:01

在 FileZilla 2.2.32 中,转到“编辑”>“ 设置> 文件传输设置> ASCII/二进制。 将其设置为始终二进制:这应该可以解决问题。

在 FileZilla 3.5.0 中,设置位于“编辑”>“编辑”中。 设置> 转移> 文件类型> 默认传输类型> 二进制。

In FileZilla 2.2.32, go Edit > Settings > File transfer settings > ASCII/Binary. Set it to always binary: that should do the trick.

In FileZilla 3.5.0 the setting is in Edit > Settings > Transfers > File Types > Default transfer type > Binary.

若沐 2024-07-20 08:21:01

您使用什么 FTP 传输模式(二进制还是 ASCII?)? 我不是 100% 确定,但我认为如果你强制使用二进制模式,你就不应该遇到这个问题。

What FTP transfer mode do you use (binary or ASCII?)? I'm not 100% sure, but I think if you force binary mode you should not have this problem.

夢归不見 2024-07-20 08:21:01

FileZilla 的开发人员似乎对默认情况下应如何传输未知文件有非常独特的看法。

错误报告自 2008 年以来一直存在。当然,如果更多人参与进来可能会有所帮助并请求修复此缺陷。

The developers of FileZilla appear to have a pretty exclusive opinion on how unknown files should be transferred by default.

The bug report dwells since 2008. Of course, it may help if more people jump in and request a fix for this flaw.

锦爱 2024-07-20 08:21:01

实际的问题是Filezilla FTP 客户端默认传输模式,默认情况下它是“自动”。 按照以下步骤将其转换为“二进制”

转到“编辑|设置...”

在此处输入图像描述

在新窗口中,转到“传输 | 文件类型”,然后在 < em>“默认传输类型”,选择“二进制”

输入图片此处描述

The actual problem was with Filezilla FTP client default transfer mode, by default it is "Auto". Follow below step to convert it into "binary".

Go to the "Edit | Settings… "

enter image description here

In the new window, go to "transfers | File Types " and in "Default transfer type", select "Binary".

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文